On 7/20/2026 7:36 AM, Yoshinori Sato wrote:
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
So I applied this series in my tester and fired up a test run just to
see how it'd respond. This series triggers 631 regression failures. So
there's clearly still work to do.
As a sample:
rx-sim: gcc: gcc.c-torture/compile/981006-1.c -O0 (test for excess
errors)
rx-sim: gcc: gcc.c-torture/compile/pr100241-1.c -O0 (test for excess
errors)
rx-sim: gcc: gcc.c-torture/compile/pr65153.c -O1 (test for excess errors)
rx-sim: gcc: gcc.c-torture/compile/pr69102.c -O0 (test for excess errors)
[ ... ]
Odds are there's just a few issues causing the vast majority of the
failures. Regardless I would suggest you run the testsuite on your
submissions to verify they don't cause regressions.
jeff