This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][AsmParser] Add support for parsing shift/extend operands with symbols.
ClosedPublic

Authored by mcrosier on Dec 19 2016, 2:25 PM.

Details

Summary

This commit allows symbols defined with the .equ/.set directive to be used as shift/extend operands for AArch64. E.g.,

.set IMM2, 2
.equ IMM4, 4

add w1, w2, w3, uxtb #IMM2
add w4, w5, w6, uxth #IMM4

This addresses PR31431.

PTAL,

Chad

Diff Detail

Repository
rL LLVM

Event Timeline

mcrosier updated this revision to Diff 82014.Dec 19 2016, 2:25 PM
mcrosier retitled this revision from to [AArch64][AsmParser] Add support for parsing shift/extend operands with symbols..
mcrosier updated this object.
mcrosier added a subscriber: llvm-commits.
mcrosier updated this revision to Diff 82110.Dec 20 2016, 7:49 AM

-Add a diagnostic check for when the symbol is not defined.

rovka accepted this revision.Dec 22 2016, 9:44 AM
rovka added a reviewer: rovka.
rovka added a subscriber: rovka.

LGTM.

test/MC/AArch64/shift_extend_op_w_symbol.s
3 ↗(On Diff #82110)

Why are you running the same thing twice? Can't you just 1> %t1 2> %t2 on the first run?

This revision is now accepted and ready to land.Dec 22 2016, 9:44 AM
This revision was automatically updated to reflect the committed changes.
mcrosier marked an inline comment as done.

Thanks for the review, Diana. I addressed your test comment in the final commit.