This is an archive of the discontinued LLVM Phabricator instance.

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

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

Diff Detail

Event Timeline

mgrang created this revision.Dec 21 2018, 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..Dec 21 2018, 2:56 PM
efriedma added inline comments.Dec 21 2018, 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.Dec 21 2018, 3:10 PM
mgrang marked an inline comment as done.
mgrang updated this revision to Diff 179376.Dec 21 2018, 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.Jan 7 2019, 11:53 AM
lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
223

Indentation.

239

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

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

405

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.Jan 7 2019, 3:46 PM
efriedma accepted this revision.Jan 7 2019, 7:00 PM

LGTM

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