Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame^] | 1 | From f3e259923788176ebb323155cc089e68c6de0895 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 |
| 4 | Subject: [PATCH 33/54] Fixing the bug in the bit-field instruction. Bit field |
| 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 |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame^] | 13 | index 30a0fcf..835e906 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 |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame^] | 16 | @@ -163,6 +163,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 |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame^] | 27 | index 2ac5aeec..991d0f7 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 | |