Skip to content

Commit c5f6a3d

Browse files
committed
rx: Apply rx gdb patch to support rxv2 and rxv3
This update adds full support for the RXv2 and RXv3 architectures across GDB, BFD, opcodes, and the RX simulator. These changes align GDB and binutils with the new GCC RX backend and enable debugging and simulation for RXv2 and RXv3 targets. The changes are pick from https://llvm-gcc-renesas.com/rx/rx-latest-source-code/ Signed-off-by: Duy Nguyen <[email protected]>
1 parent cf8ec4d commit c5f6a3d

36 files changed

+5503
-1150
lines changed

bfd/archures.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ DESCRIPTION
454454
.#define bfd_mach_rx 0x75
455455
.#define bfd_mach_rx_v2 0x76
456456
.#define bfd_mach_rx_v3 0x77
457+
.#define bfd_mach_rx_v3_dfpu 0x78
457458
. bfd_arch_s390, {* IBM s390. *}
458459
.#define bfd_mach_s390_31 31
459460
.#define bfd_mach_s390_64 64
@@ -536,6 +537,10 @@ DESCRIPTION
536537
.#define bfd_mach_aarch64_8R 1
537538
.#define bfd_mach_aarch64_ilp32 32
538539
.#define bfd_mach_aarch64_llp64 64
540+
. bfd_arch_nios2, {* Nios II. *}
541+
.#define bfd_mach_nios2 0
542+
.#define bfd_mach_nios2r1 1
543+
.#define bfd_mach_nios2r2 2
539544
. bfd_arch_visium, {* Visium. *}
540545
.#define bfd_mach_visium 1
541546
. bfd_arch_wasm32, {* WebAssembly. *}
@@ -677,6 +682,7 @@ extern const bfd_arch_info_type bfd_msp430_arch;
677682
extern const bfd_arch_info_type bfd_mt_arch;
678683
extern const bfd_arch_info_type bfd_nds32_arch;
679684
extern const bfd_arch_info_type bfd_nfp_arch;
685+
extern const bfd_arch_info_type bfd_nios2_arch;
680686
extern const bfd_arch_info_type bfd_ns32k_arch;
681687
extern const bfd_arch_info_type bfd_or1k_arch;
682688
extern const bfd_arch_info_type bfd_pdp11_arch;
@@ -765,6 +771,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
765771
&bfd_mt_arch,
766772
&bfd_nds32_arch,
767773
&bfd_nfp_arch,
774+
&bfd_nios2_arch,
768775
&bfd_ns32k_arch,
769776
&bfd_or1k_arch,
770777
&bfd_pdp11_arch,

bfd/bfd-in2.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,6 +1719,7 @@ enum bfd_architecture
17191719
#define bfd_mach_rx 0x75
17201720
#define bfd_mach_rx_v2 0x76
17211721
#define bfd_mach_rx_v3 0x77
1722+
#define bfd_mach_rx_v3_dfpu 0x78
17221723
bfd_arch_s390, /* IBM s390. */
17231724
#define bfd_mach_s390_31 31
17241725
#define bfd_mach_s390_64 64

bfd/cpu-rx.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* BFD support for the RX processor.
2-
Copyright (C) 2008-2024 Free Software Foundation, Inc.
2+
Copyright (C) 2008-2025 Free Software Foundation, Inc.
33
44
This file is part of BFD, the Binary File Descriptor library.
55
@@ -27,12 +27,13 @@
2727
bfd_default_compatible, bfd_default_scan, \
2828
bfd_arch_default_fill, next, 0 }
2929

30-
static const bfd_arch_info_type arch_info_struct[2] =
30+
static const bfd_arch_info_type arch_info_struct[4] =
3131
{
32-
N (bfd_mach_rx_v2, "rx:v2", 3, false, arch_info_struct + 1),
33-
N (bfd_mach_rx_v3, "rx:v3", 3, false, NULL)
32+
N (bfd_mach_rx, "rx", 3, false, arch_info_struct + 1),
33+
N (bfd_mach_rx_v2, "rx:v2", 3, false, arch_info_struct + 2),
34+
N (bfd_mach_rx_v3, "rx:v3", 3, false, arch_info_struct + 3),
35+
N (bfd_mach_rx_v3_dfpu, "rx:v3", 3, false, NULL)
3436
};
3537

3638
const bfd_arch_info_type bfd_rx_arch =
3739
N (bfd_mach_rx, "rx", 4, true, arch_info_struct + 0);
38-

0 commit comments

Comments
 (0)