Page MenuHomePhabricator

[MC] [AArch64] Support resolving signed fixups for :abs_g0_s: etc.
ClosedPublic

Authored by mgrang on Fri, Dec 21, 2:55 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

mgrang created this revision.Fri, Dec 21, 2:55 PM
mgrang retitled this revision from [COFF, ARM64] Support resolving signed fixups for :abs_g0_s: etc. to [MC] [AArch64] Support resolving signed fixups for :abs_g0_s: etc..Fri, Dec 21, 2:56 PM
efriedma added inline comments.Fri, Dec 21, 3:01 PM
MC/AArch64/fixup-absolute-signed.s
30 ↗(On Diff #179367)

Can you also add a testcase for something like "movn x0, #:abs_g0_s:onepart_after". (Yes, it's kind of silly, but the assembler allows it.)

mgrang updated this revision to Diff 179372.Fri, Dec 21, 3:10 PM
mgrang marked an inline comment as done.
mgrang updated this revision to Diff 179376.Fri, Dec 21, 3:50 PM

Ping for reviews please.

Ping2 for reviews please.

Ping2 for reviews please.

I'd like to defer this one to @efriedma.

efriedma added inline comments.Mon, Jan 7, 11:53 AM
lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
223 ↗(On Diff #179376)

Indentation.

239 ↗(On Diff #179376)

VK_SABS isn't a bit-mask; this technically works because of the specific values of VK_ABS and VK_SABS, but it's very confusing. Please use something like AArch64MCExpr::getSymbolLoc(RefKind) == AArch64MCExpr::VK_SABS instead.

274 ↗(On Diff #179376)

Please use braces consistently for the whole if-else sequence.

405 ↗(On Diff #179376)

We should probably fix getFixupKindInfo() and getFixupKindNumBytes() to correctly account for this bit. Granted, it probably doesn't have much practical effect... I think it'll affect the comments generated by "-show-mc-encoding", and not much else.

mgrang updated this revision to Diff 180582.Mon, Jan 7, 3:46 PM
efriedma accepted this revision.Mon, Jan 7, 7:00 PM

LGTM

This revision is now accepted and ready to land.Mon, Jan 7, 7:00 PM
This revision was automatically updated to reflect the committed changes.