This is an archive of the discontinued LLVM Phabricator instance.

[LoongArch] Emit R_LARCH_64_PCREL relocation for FK_Data_8 when IsPCRel is true
ClosedPublic

Authored by SixWeining on Jun 27 2023, 7:01 AM.

Diff Detail

Event Timeline

SixWeining created this revision.Jun 27 2023, 7:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2023, 7:01 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
SixWeining requested review of this revision.Jun 27 2023, 7:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2023, 7:01 AM
xen0n accepted this revision.Jun 27 2023, 7:03 AM

Straightforward enough!

This revision is now accepted and ready to land.Jun 27 2023, 7:03 AM
hev accepted this revision.Jun 27 2023, 8:04 AM
MaskRay accepted this revision.Jun 27 2023, 10:28 AM

Some nits about the test

llvm/test/MC/LoongArch/Relocations/sub-expr.s
9

Better to make sx and sy SHF_ALLOC by using "a"

14

Changing these from inline comments to non-inline comments should be cleaner.

Add -NEXT and surround them with a pair of CHECK: .rela .data { and CHECK-NEXT: } to test that there is no additional relocation.

Address @MaskRay's comments by polishing the test.

SixWeining marked 2 inline comments as done.Jun 27 2023, 5:52 PM