Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 1 | From 51da0572e0650378e422030b26d1258c8fc76df6 Mon Sep 17 00:00:00 2001 |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 3 | Date: Wed, 18 Jan 2017 13:57:48 +0530 |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 4 | Subject: [PATCH 33/63] Fixing the bug in the bit-field instruction. Bit field |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 5 | instruction should be generated only if mcpu >10.0 |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 6 | |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 7 | --- |
| 8 | gcc/config/microblaze/microblaze.c | 3 +++ |
| 9 | gcc/config/microblaze/microblaze.h | 2 ++ |
| 10 | 2 files changed, 5 insertions(+) |
| 11 | |
| 12 | diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 13 | index 3f68ef0..a37f08eea 100644 |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 14 | --- a/gcc/config/microblaze/microblaze.c |
| 15 | +++ b/gcc/config/microblaze/microblaze.c |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 16 | @@ -164,6 +164,9 @@ int microblaze_no_unsafe_delay; |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 17 | /* 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. :( |
| 26 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 27 | index bf7f3b4..1d05e6e 100644 |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 28 | --- 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 Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 47 | 2.7.4 |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 48 | |