blob: 15111477a2ddca15f2432ed6de0ed9cddce69253 [file] [log] [blame]
Brad Bishop26bdd442019-08-16 17:08:17 -04001From f3e259923788176ebb323155cc089e68c6de0895 Mon Sep 17 00:00:00 2001
Brad Bishop286d45c2018-10-02 15:21:57 -04002From: Mahesh Bodapati <mbodapat@xilinx.com>
Brad Bishop26bdd442019-08-16 17:08:17 -04003Date: Wed, 18 Jan 2017 13:57:48 +0530
4Subject: [PATCH 33/54] Fixing the bug in the bit-field instruction. Bit field
5 instruction should be generated only if mcpu >10.0
Brad Bishop286d45c2018-10-02 15:21:57 -04006
Brad Bishop286d45c2018-10-02 15:21:57 -04007---
8 gcc/config/microblaze/microblaze.c | 3 +++
9 gcc/config/microblaze/microblaze.h | 2 ++
10 2 files changed, 5 insertions(+)
11
12diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
Brad Bishop26bdd442019-08-16 17:08:17 -040013index 30a0fcf..835e906 100644
Brad Bishop286d45c2018-10-02 15:21:57 -040014--- a/gcc/config/microblaze/microblaze.c
15+++ b/gcc/config/microblaze/microblaze.c
Brad Bishop26bdd442019-08-16 17:08:17 -040016@@ -163,6 +163,9 @@ int microblaze_no_unsafe_delay;
Brad Bishop286d45c2018-10-02 15:21:57 -040017 /* Set to one if the targeted core has the CLZ insn. */
18 int microblaze_has_clz = 0;
19
20+/* Set to one if the targeted core has barrel-shift and cpu > 10.0 */
21+int microblaze_has_bitfield = 0;
22+
23 /* Which CPU pipeline do we use. We haven't really standardized on a CPU
24 version having only a particular type of pipeline. There can still be
25 options on the CPU to scale pipeline features up or down. :(
26diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
Brad Bishop26bdd442019-08-16 17:08:17 -040027index 2ac5aeec..991d0f7 100644
Brad Bishop286d45c2018-10-02 15:21:57 -040028--- a/gcc/config/microblaze/microblaze.h
29+++ b/gcc/config/microblaze/microblaze.h
30@@ -44,6 +44,7 @@ extern int microblaze_dbx_regno[];
31
32 extern int microblaze_no_unsafe_delay;
33 extern int microblaze_has_clz;
34+extern int microblaze_has_bitfield;
35 extern enum pipeline_type microblaze_pipe;
36
37 #define OBJECT_FORMAT_ELF
38@@ -62,6 +63,7 @@ extern enum pipeline_type microblaze_pipe;
39
40 /* Do we have CLZ? */
41 #define TARGET_HAS_CLZ (TARGET_PATTERN_COMPARE && microblaze_has_clz)
42+#define TARGET_HAS_BITFIELD (TARGET_BARREL_SHIFT && microblaze_has_bitfield)
43
44 /* The default is to support PIC. */
45 #define TARGET_SUPPORTS_PIC 1
46--
Brad Bishop26bdd442019-08-16 17:08:17 -0400472.7.4
Brad Bishop286d45c2018-10-02 15:21:57 -040048