diff options
3 files changed, 73 insertions, 0 deletions
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils-microblaze.inc b/meta-microblaze/recipes-devtools/binutils/binutils-microblaze.inc index 5e85eedc..191d69ef 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils-microblaze.inc +++ b/meta-microblaze/recipes-devtools/binutils/binutils-microblaze.inc | |||
@@ -35,6 +35,8 @@ SRC_URI:append = " \ | |||
35 | file://0032-Patch-MicroBlaze-Double-free-with-ld-no-keep-memory.patch \ | 35 | file://0032-Patch-MicroBlaze-Double-free-with-ld-no-keep-memory.patch \ |
36 | file://0033-Patch-MB-MB-binutils-Upstream-port-issues.patch \ | 36 | file://0033-Patch-MB-MB-binutils-Upstream-port-issues.patch \ |
37 | file://0034-Patch-MicroBlaze-By-default-the-linker-will-generate.patch \ | 37 | file://0034-Patch-MicroBlaze-By-default-the-linker-will-generate.patch \ |
38 | file://0035-Fix-for-objdump-issue-for-mb32-el.patch \ | ||
39 | file://0036-Fix-for-missing-instructions-in-dump.patch \ | ||
38 | " | 40 | " |
39 | 41 | ||
40 | LDGOLD_ALTS:microblaze = "" | 42 | LDGOLD_ALTS:microblaze = "" |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0035-Fix-for-objdump-issue-for-mb32-el.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0035-Fix-for-objdump-issue-for-mb32-el.patch new file mode 100644 index 00000000..b63d368a --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0035-Fix-for-objdump-issue-for-mb32-el.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From f070f81107d4b1e497207c1668f079dabb0b4417 Mon Sep 17 00:00:00 2001 | ||
2 | From: Aayush Misra <aayushm@amd.com> | ||
3 | Date: Mon, 24 Jul 2023 21:49:14 +0530 | ||
4 | Subject: [PATCH 35/36] Fix for objdump issue for mb32-el | ||
5 | |||
6 | --- | ||
7 | opcodes/microblaze-dis.c | 7 ++++--- | ||
8 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
9 | |||
10 | diff --git a/opcodes/microblaze-dis.c b/opcodes/microblaze-dis.c | ||
11 | index b76a5935a34..237a6081377 100644 | ||
12 | --- a/opcodes/microblaze-dis.c | ||
13 | +++ b/opcodes/microblaze-dis.c | ||
14 | @@ -36,7 +36,7 @@ | ||
15 | #define get_int_field_imml(instr) ((instr & IMML_MASK) >> IMM_LOW) | ||
16 | #define get_int_field_r1(instr) ((instr & RA_MASK) >> RA_LOW) | ||
17 | |||
18 | -#define NUM_STRBUFS 3 | ||
19 | +#define NUM_STRBUFS 4 | ||
20 | #define STRBUF_SIZE 25 | ||
21 | |||
22 | struct string_buf | ||
23 | @@ -466,8 +466,9 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
24 | case INST_TYPE_NONE: | ||
25 | break; | ||
26 | case INST_TYPE_RD_IMML: | ||
27 | - print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), get_field_imm16 (&buf, inst)); | ||
28 | - break; | ||
29 | + if(info->insn_type != dis_noninsn) | ||
30 | + print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), get_field_imm16 (&buf, inst)); | ||
31 | + break; | ||
32 | /* For bit field insns. */ | ||
33 | case INST_TYPE_RD_R1_IMMW_IMMS: | ||
34 | print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst),get_field_r1(&buf, inst),get_field_immw (&buf, inst), get_field_imms (&buf, inst)); | ||
35 | -- | ||
36 | 2.34.1 | ||
37 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0036-Fix-for-missing-instructions-in-dump.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0036-Fix-for-missing-instructions-in-dump.patch new file mode 100644 index 00000000..e48dfe84 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0036-Fix-for-missing-instructions-in-dump.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 834cc7ca420d3fb783fb813b336e76960eb5b28e Mon Sep 17 00:00:00 2001 | ||
2 | From: Aayush Misra <aayushm@amd.com> | ||
3 | Date: Thu, 28 Mar 2024 16:33:40 +0530 | ||
4 | Subject: [PATCH 36/36] Fix for missing instructions in dump | ||
5 | |||
6 | --- | ||
7 | opcodes/microblaze-dis.c | 4 ++-- | ||
8 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
9 | |||
10 | diff --git a/opcodes/microblaze-dis.c b/opcodes/microblaze-dis.c | ||
11 | index 237a6081377..a83e00e282b 100644 | ||
12 | --- a/opcodes/microblaze-dis.c | ||
13 | +++ b/opcodes/microblaze-dis.c | ||
14 | @@ -266,7 +266,7 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
15 | |||
16 | inst = read_insn_microblaze (memaddr, info, &op); | ||
17 | if (inst == 0) | ||
18 | - return -1; | ||
19 | + return 4; | ||
20 | |||
21 | if (prev_insn_vma == curr_insn_vma) | ||
22 | { | ||
23 | @@ -274,7 +274,7 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
24 | { | ||
25 | prev_inst = read_insn_microblaze (prev_insn_addr, info, &pop); | ||
26 | if (prev_inst == 0) | ||
27 | - return -1; | ||
28 | + return 4; | ||
29 | if (pop->instr == imm) | ||
30 | { | ||
31 | immval = (get_int_field_imm (prev_inst) << 16) & 0xffff0000; | ||
32 | -- | ||
33 | 2.34.1 | ||
34 | |||