This is an archive of the discontinued LLVM Phabricator instance.

[MC][LoongArch] Make .reloc support arbitrary relocation types
ClosedPublic

Authored by wangleiat on Aug 18 2022, 2:39 AM.

Details

Summary

Similar to D76746 (ARM), D76754 (AArch64), D77018 (RISCV) and
llvmorg-11-init-6967-g152d14da64c (x86)

Depends on D132108

Diff Detail

Event Timeline

wangleiat created this revision.Aug 18 2022, 2:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 18 2022, 2:39 AM
wangleiat requested review of this revision.Aug 18 2022, 2:39 AM
xen0n added a comment.Aug 18 2022, 3:16 AM

Only one minor nit. Thanks.

llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp
27–28

could simplify a bit, to auto Type = ...

MaskRay accepted this revision.Aug 18 2022, 8:50 AM
This revision is now accepted and ready to land.Aug 18 2022, 8:50 AM
wangleiat updated this revision to Diff 453853.Aug 18 2022, 6:23 PM

Address @xen0n's comment.

thakis added a subscriber: thakis.Dec 3 2022, 4:38 AM
thakis added inline comments.
llvm/test/MC/LoongArch/Relocations/reloc-directive-err.s
1

zsh on macOS complains about |&:

/Users/thakis/src/llvm-project/out/gn/obj/llvm/test/MC/LoongArch/Relocations/Output/reloc-directive-err.s.script: line 1: syntax error near unexpected token `&'

I'll tweak this test, but going forward, please don't use |& in tests.