diff options
author | Mark Hatle <mark.hatle@xilinx.com> | 2020-04-16 09:53:56 -0700 |
---|---|---|
committer | Mark Hatle <mark.hatle@xilinx.com> | 2020-04-16 09:53:56 -0700 |
commit | a5be7ea24f03ff484e678e29375bef031acad6d7 (patch) | |
tree | 6d8ace9cd9f919d5f2e2a6c0c09b62755c44361f | |
parent | abd923dfb2fc3d0e4cdc772112d08802562950c8 (diff) | |
download | meta-xilinx-a5be7ea24f03ff484e678e29375bef031acad6d7.tar.gz |
binutils: Microblaze integrate fix from upstream
Issue: CR-1016400
[Patch,MicroBlaze m64] : This patch will remove imml 0 and
imml -1 instructions when the offset is less than 16 bit for Type A branch EA
instructions.
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
2 files changed, 39 insertions, 0 deletions
diff --git a/meta-xilinx-bsp/recipes-microblaze/binutils/binutils-microblaze.inc b/meta-xilinx-bsp/recipes-microblaze/binutils/binutils-microblaze.inc index 689337b4..f2f29918 100644 --- a/meta-xilinx-bsp/recipes-microblaze/binutils/binutils-microblaze.inc +++ b/meta-xilinx-bsp/recipes-microblaze/binutils/binutils-microblaze.inc | |||
@@ -46,4 +46,5 @@ SRC_URI_append = " \ | |||
46 | file://0043-Removing-the-header-gdb_assert.h-from-MB-target-file.patch \ | 46 | file://0043-Removing-the-header-gdb_assert.h-from-MB-target-file.patch \ |
47 | file://0044-gdb-microblaze-linux-nat.c-Fix-target-compilation-of.patch \ | 47 | file://0044-gdb-microblaze-linux-nat.c-Fix-target-compilation-of.patch \ |
48 | file://0045-Fixed-bug-in-generation-of-IMML-instruction-for-the.patch \ | 48 | file://0045-Fixed-bug-in-generation-of-IMML-instruction-for-the.patch \ |
49 | file://0046-Patch-MicroBlaze-m64-This-patch-will-remove-imml-0-a.patch \ | ||
49 | " | 50 | " |
diff --git a/meta-xilinx-bsp/recipes-microblaze/binutils/binutils/0046-Patch-MicroBlaze-m64-This-patch-will-remove-imml-0-a.patch b/meta-xilinx-bsp/recipes-microblaze/binutils/binutils/0046-Patch-MicroBlaze-m64-This-patch-will-remove-imml-0-a.patch new file mode 100644 index 00000000..7677ab35 --- /dev/null +++ b/meta-xilinx-bsp/recipes-microblaze/binutils/binutils/0046-Patch-MicroBlaze-m64-This-patch-will-remove-imml-0-a.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 9c8f4f1c11d324f0788da3a077b06c6bc9e6f2b8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Thu, 16 Apr 2020 18:08:58 +0530 | ||
4 | Subject: [PATCH] [Patch,MicroBlaze m64] : This patch will remove imml 0 and | ||
5 | imml -1 instructions when the offset is less than 16 bit for Type A branch EA | ||
6 | instructions. | ||
7 | |||
8 | --- | ||
9 | gas/config/tc-microblaze.c | 6 ++---- | ||
10 | 1 file changed, 2 insertions(+), 4 deletions(-) | ||
11 | |||
12 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
13 | index 088eae73a9..12fd145a03 100644 | ||
14 | --- a/gas/config/tc-microblaze.c | ||
15 | +++ b/gas/config/tc-microblaze.c | ||
16 | @@ -2150,9 +2150,7 @@ md_assemble (char * str) | ||
17 | if (exp.X_op != O_constant) | ||
18 | { | ||
19 | char *opc; | ||
20 | - if (microblaze_arch_size == 64 && (streq (name, "breai") || | ||
21 | - streq (name, "breaid") || | ||
22 | - streq (name, "brai") || streq (name, "braid"))) | ||
23 | + if (microblaze_arch_size == 64 && (streq (name, "brai") || streq (name, "braid"))) | ||
24 | opc = str_microblaze_64; | ||
25 | else | ||
26 | opc = NULL; | ||
27 | @@ -2920,7 +2918,7 @@ md_apply_fix (fixS * fixP, | ||
28 | case BFD_RELOC_MICROBLAZE_64: | ||
29 | case BFD_RELOC_MICROBLAZE_64_PCREL: | ||
30 | if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64 | ||
31 | - || fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64_PCREL) | ||
32 | + || fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64_PCREL || (fixP->fx_r_type == BFD_RELOC_64_PCREL && microblaze_arch_size == 64)) | ||
33 | { | ||
34 | /* Generate the imm instruction. */ | ||
35 | if (((long long)val) > (long long)-549755813888 && ((long long)val) < (long long)549755813887) | ||
36 | -- | ||
37 | 2.17.1 | ||
38 | |||