[PATCH] D145474: [RISCV][MC] Adjust conditions to emit R_RISCV_ADD*/R_RISCV_SUB* pairs
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 6 23:10:43 PST 2023
MaskRay created this revision.
MaskRay added reviewers: asb, compnerd, jrtc27, kito-cheng.
Herald added subscribers: luke, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, shiva0217, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
MaskRay requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD.
Herald added a project: LLVM.
D132262 <https://reviews.llvm.org/D132262> tried to simplify `IsMetadataOrEHFrameSection` originally introduced in
D127549 <https://reviews.llvm.org/D127549> but caused a regression as `.quad` directives in
.section .note,"a", at note; note:
.quad extern-note
.section .rodata,"a", at progbits; rodata:
.quad extern-rodata
.section .nonalloc,"", at progbits; nw:
.quad extern-nw
are incorrectly rejected: these differences may be link-time constants and
are allowed in GNU assembler and LLVM MC's non-RISC-V ports.
Relax the conditions to allow these cases. I suspect we may allow some cases
that should be rejected, but this is better than incorrect rejection.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D145474
Files:
llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp
llvm/test/MC/RISCV/riscv64-64b-pcrel.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145474.502932.patch
Type: text/x-patch
Size: 4846 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230307/d2c810d2/attachment.bin>
More information about the llvm-commits
mailing list