diff options
Diffstat (limited to 'meta-microblaze/recipes-devtools/binutils/binutils/0025-Fixed-bug-in-generation-of-IMML-instruction-for-the.patch')
-rw-r--r-- | meta-microblaze/recipes-devtools/binutils/binutils/0025-Fixed-bug-in-generation-of-IMML-instruction-for-the.patch | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0025-Fixed-bug-in-generation-of-IMML-instruction-for-the.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0025-Fixed-bug-in-generation-of-IMML-instruction-for-the.patch deleted file mode 100644 index c4ece2fe..00000000 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0025-Fixed-bug-in-generation-of-IMML-instruction-for-the.patch +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | From 0ba14f999b266406e7e86fc0e7311ebb275e7b97 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Wed, 3 Nov 2021 12:13:32 +0530 | ||
4 | Subject: [PATCH 25/34] Fixed bug in generation of IMML instruction for the | ||
5 | |||
6 | new MB-64 instructions with single register. | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
11 | --- | ||
12 | gas/config/tc-microblaze.c | 50 +++++++++++++++++++++++++++++++++++--- | ||
13 | 1 file changed, 47 insertions(+), 3 deletions(-) | ||
14 | |||
15 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
16 | index 4c455ff02b8..bccaafe296c 100644 | ||
17 | --- a/gas/config/tc-microblaze.c | ||
18 | +++ b/gas/config/tc-microblaze.c | ||
19 | @@ -1643,12 +1643,56 @@ md_assemble (char * str) | ||
20 | exp.X_add_symbol, | ||
21 | exp.X_add_number, | ||
22 | (char *) opc); | ||
23 | - immedl = 0L; | ||
24 | + immed = 0L; | ||
25 | } | ||
26 | else | ||
27 | { | ||
28 | output = frag_more (isize); | ||
29 | immed = exp.X_add_number; | ||
30 | + temp = ((long long)immed) & 0xFFFFFFFFFFFF8000; | ||
31 | + if (temp != 0 && temp != 0xFFFFFFFFFFFF8000 && temp != 0x8000) | ||
32 | + { | ||
33 | + /* Needs an immediate inst. */ | ||
34 | + if (((long long)immed) > (long long)-549755813888 && ((long long)immed) < (long long)549755813887) | ||
35 | + { | ||
36 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
37 | + if (opcode1 == NULL) | ||
38 | + { | ||
39 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
40 | + return; | ||
41 | + } | ||
42 | + inst1 = opcode1->bit_sequence; | ||
43 | + inst1 |= ((immed & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
44 | + output[0] = INST_BYTE0 (inst1); | ||
45 | + output[1] = INST_BYTE1 (inst1); | ||
46 | + output[2] = INST_BYTE2 (inst1); | ||
47 | + output[3] = INST_BYTE3 (inst1); | ||
48 | + output = frag_more (isize); | ||
49 | + } | ||
50 | + else { | ||
51 | + opcode2 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
52 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
53 | + if (opcode1 == NULL || opcode2 == NULL) | ||
54 | + { | ||
55 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
56 | + return; | ||
57 | + } | ||
58 | + inst1 = opcode2->bit_sequence; | ||
59 | + inst1 |= ((immed & 0xFFFFFF0000000000L) >> 40) & IMML_MASK; | ||
60 | + output[0] = INST_BYTE0 (inst1); | ||
61 | + output[1] = INST_BYTE1 (inst1); | ||
62 | + output[2] = INST_BYTE2 (inst1); | ||
63 | + output[3] = INST_BYTE3 (inst1); | ||
64 | + output = frag_more (isize); | ||
65 | + inst1 = opcode1->bit_sequence; | ||
66 | + inst1 |= ((immed & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
67 | + output[0] = INST_BYTE0 (inst1); | ||
68 | + output[1] = INST_BYTE1 (inst1); | ||
69 | + output[2] = INST_BYTE2 (inst1); | ||
70 | + output[3] = INST_BYTE3 (inst1); | ||
71 | + output = frag_more (isize); | ||
72 | + } | ||
73 | + } | ||
74 | } | ||
75 | inst |= (reg1 << RD_LOW) & RD_MASK; | ||
76 | inst |= (immed << IMM_LOW) & IMM16_MASK; | ||
77 | @@ -2146,8 +2190,8 @@ md_assemble (char * str) | ||
78 | streq (name, "breaid") || | ||
79 | streq (name, "brai") || streq (name, "braid"))) | ||
80 | { | ||
81 | - temp = immed & 0xFFFFFFFFFFFF8000; | ||
82 | - if (temp != 0) | ||
83 | + temp = ((long long)immed) & 0xFFFFFFFFFFFF8000; | ||
84 | + if (temp != 0 && temp != 0xFFFFFFFFFFFF8000 && temp != 0x8000) | ||
85 | { | ||
86 | /* Needs an immediate inst. */ | ||
87 | if (((long long)immed) > (long long)-549755813888 && ((long long)immed) < (long long)549755813887) | ||
88 | -- | ||
89 | 2.37.1 (Apple Git-137.1) | ||
90 | |||