Hello,
This is v3 of the Renesas RX FDPIC support patch.
This update cleans up and refactors the PIC/FDPIC operand legitimization
and PC-relative symbol addressing based on feedback and updates.
Summary of changes:
1. PIC / FDPIC & PC-Relative Refactoring
- Unified PIC operand legitimization helper functions by replacing
rx_mov_pic_operands and rx_maybe_pidify_operand with
rx_maybe_legitimize_pi_operand and rx_expand_pcrel[cite: 1].
- Improved address legitimacy checks (rx_is_legitimate_address) and local
read-only symbol handling (rx_is_local_readonly_data_p) for PC-relative
addressing[cite: 1].
- Updated PIC offset table register tracking in prologue/epilogue and call
patterns (clobbering/using PIC_REG where appropriate, and defining
EPILOGUE_USES for FDPIC)[cite: 1].
- Standardized assembly output printing for GOT/GOTOFF/PLT unspecs using
a new helper function (rx_print_operand_with_attrib)[cite: 1].
2. General Cleanups & Fixes
- Cleaned up predicate definitions in predicates.md and header
prototypes[cite: 1].
- Improved GNU coding style compliance and comment formatting[cite: 1].
Changes since v2:
- Refactored PIC/FDPIC helper functions and PC-relative address loading.
- Cleaned up assembly output for GOT/GOTOFF/PLT symbol attributes.
- (LRA support and DImode arithmetic expansion were split out into separate
patches).
Testing:
- Confirmed no unexpected failures (no regressions) in `make check`.
- Verified that BusyBox built with this compiler runs correctly on a real
Renesas RX62N MCU board.
Specification reference:
https://gitlab.com/yoshinori.sato/gcc/-/wikis/RX-FDPIC
Thanks,
Yoshinori Sato
Yoshinori Sato (4):
RX: FDPIC support - machine description
RX: FDPIC support - helper functions
RX: FDPIC support - headers
RX: shared libgcc support
config/picflag.m4 | 4 +
gcc/config/rx/linux.h | 58 ++++
gcc/config/rx/predicates.md | 12 +
gcc/config/rx/rx-protos.h | 8 +-
gcc/config/rx/rx.cc | 574 ++++++++++++++++++++++++++++++--
gcc/config/rx/rx.h | 3 +-
gcc/config/rx/rx.md | 339 +++++++++++++++++--
gcc/config/rx/rx.opt | 6 +
libgcc/config.host | 3 +-
libgcc/config/rx/rx-abi.h | 7 +-
libgcc/config/rx/unwind-linux.h | 24 ++
libgcc/configure | 14 +-
12 files changed, 996 insertions(+), 56 deletions(-)
create mode 100644 libgcc/config/rx/unwind-linux.h
--
2.47.3