blob: 68f70ae8d383d797b6d500e36fe7944de8f45558 [file] [log] [blame]
Andrew Geissler84ad7c52020-06-27 00:00:16 -05001From 51da0572e0650378e422030b26d1258c8fc76df6 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
Andrew Geissler84ad7c52020-06-27 00:00:16 -05004Subject: [PATCH 33/63] Fixing the bug in the bit-field instruction. Bit field
Brad Bishop26bdd442019-08-16 17:08:17 -04005 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
Andrew Geissler84ad7c52020-06-27 00:00:16 -050013index 3f68ef0..a37f08eea 100644
Brad Bishop286d45c2018-10-02 15:21:57 -040014--- a/gcc/config/microblaze/microblaze.c
15+++ b/gcc/config/microblaze/microblaze.c
Andrew Geissler84ad7c52020-06-27 00:00:16 -050016@@ -164,6 +164,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
Andrew Geissler84ad7c52020-06-27 00:00:16 -050027index bf7f3b4..1d05e6e 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