[PATCH v2 0/2] RISC-V: Support ".option [no]exact" assembler directives
Tsukasa OI
research_trasio@irq.a4lg.com
Wed May 14 07:17:46 GMT 2025
Hello,
See PATCH 2/2 for the purpose of this patch set.
PATCH 1/2 fixes a bug (which is very important to fix when we implement
the exact mode but already affected ".option norelax" code).
Version 1 (2025-05-13)
=======================
cf. <https://sourceware.org/pipermail/binutils/2025-May/141042.html>
This is the initial proposal.
Version 2 (2025-05-14) - THIS VERSION
======================================
No changes in the code.
* PATCH 1/2 (Commit message):
Clarify again that, in the scope of this fix, the relocation is
optionally removed when the linker relaxation is disabled.
* PATCH 2/2 (Commit message):
Notify that the exact mode is already implemented in LLVM.
* PATCH 2/2 (Documentation):
* Imply that there is a small room for minor specification
change related to ".option exact/noexact".
* Document that there are flaky interactions between
".option relax/norelax" and ".option exact/noexact"
and add a warning about them.
Tsukasa OI (2):
RISC-V: check offsets when linker relaxation is disabled
RISC-V: Support ".option [no]exact" assembler directives
gas/config/tc-riscv.c | 88 +++++++--
gas/doc/c-riscv.texi | 13 ++
.../gas/riscv/exact-branch-extern-exact.d | 32 ++++
.../gas/riscv/exact-branch-extern-noexact.d | 50 ++++++
gas/testsuite/gas/riscv/exact-branch-extern.s | 40 +++++
.../gas/riscv/exact-branch-local-exact-fail.d | 3 +
.../gas/riscv/exact-branch-local-exact-fail.l | 43 +++++
.../gas/riscv/exact-branch-local-exact-ok.d | 75 ++++++++
.../gas/riscv/exact-branch-local-noexact.d | 149 +++++++++++++++
gas/testsuite/gas/riscv/exact-branch-local.s | 138 ++++++++++++++
gas/testsuite/gas/riscv/exact.d | 15 ++
gas/testsuite/gas/riscv/exact.s | 10 ++
.../gas/riscv/no-relax-branch-offset-fail.d | 2 +
.../gas/riscv/no-relax-branch-offset-fail.l | 11 ++
.../gas/riscv/no-relax-branch-offset-fail.s | 23 +++
.../gas/riscv/no-relax-branch-offset-ok.d | 17 ++
.../gas/riscv/no-relax-branch-offset-ok.s | 17 ++
.../gas/riscv/no-relax-pcrel-offset-fail-64.d | 2 +
.../gas/riscv/no-relax-pcrel-offset-fail-64.l | 7 +
.../gas/riscv/no-relax-pcrel-offset-fail-64.s | 31 ++++
.../riscv/no-relax-pcrel-offset-fail-not-32.d | 22 +++
.../gas/riscv/no-relax-pcrel-offset-ok.d | 21 +++
.../gas/riscv/no-relax-pcrel-offset-ok.s | 29 +++
include/opcode/riscv.h | 6 +
opcodes/riscv-opc.c | 170 +++++++++---------
25 files changed, 914 insertions(+), 100 deletions(-)
create mode 100644 gas/testsuite/gas/riscv/exact-branch-extern-exact.d
create mode 100644 gas/testsuite/gas/riscv/exact-branch-extern-noexact.d
create mode 100644 gas/testsuite/gas/riscv/exact-branch-extern.s
create mode 100644 gas/testsuite/gas/riscv/exact-branch-local-exact-fail.d
create mode 100644 gas/testsuite/gas/riscv/exact-branch-local-exact-fail.l
create mode 100644 gas/testsuite/gas/riscv/exact-branch-local-exact-ok.d
create mode 100644 gas/testsuite/gas/riscv/exact-branch-local-noexact.d
create mode 100644 gas/testsuite/gas/riscv/exact-branch-local.s
create mode 100644 gas/testsuite/gas/riscv/exact.d
create mode 100644 gas/testsuite/gas/riscv/exact.s
create mode 100644 gas/testsuite/gas/riscv/no-relax-branch-offset-fail.d
create mode 100644 gas/testsuite/gas/riscv/no-relax-branch-offset-fail.l
create mode 100644 gas/testsuite/gas/riscv/no-relax-branch-offset-fail.s
create mode 100644 gas/testsuite/gas/riscv/no-relax-branch-offset-ok.d
create mode 100644 gas/testsuite/gas/riscv/no-relax-branch-offset-ok.s
create mode 100644 gas/testsuite/gas/riscv/no-relax-pcrel-offset-fail-64.d
create mode 100644 gas/testsuite/gas/riscv/no-relax-pcrel-offset-fail-64.l
create mode 100644 gas/testsuite/gas/riscv/no-relax-pcrel-offset-fail-64.s
create mode 100644 gas/testsuite/gas/riscv/no-relax-pcrel-offset-fail-not-32.d
create mode 100644 gas/testsuite/gas/riscv/no-relax-pcrel-offset-ok.d
create mode 100644 gas/testsuite/gas/riscv/no-relax-pcrel-offset-ok.s
base-commit: 6ebd38072de4a77a2d28f04a79b64ab570532e98
--
2.43.0
More information about the Binutils
mailing list