This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Teach AsmPrinter about GlobalAddress operands.
ClosedPublic

Authored by ab on Mar 3 2015, 2:19 PM.

Details

Summary

Basic fix for http://llvm.org/bugs/show_bug.cgi?id=22761.

Looking at the ARM counterpart, it handles stuff like ":lower16:" and more interestingly "(PLT)". Even more interestingly, removing those doesn't break any tests.
I tried to get some more interesting testcases, but I settled on an assert on the target flags, as I couldn't come up with a case where any of those would be set in inline asm (the other way to get to printOperand is the DEBUG_VALUE comment printer, but that's even more constrained).

Examples and pointers welcome!

I don't have a clear picture of the place of AsmPrinter in the grand scheme of things - yet -, so I'll have a second look and update if necessary (to the ARM version as well, smells like dead code to me).

Thanks,
-Ahmed

Diff Detail

Event Timeline

ab updated this revision to Diff 21139.Mar 3 2015, 2:19 PM
ab retitled this revision from to [AArch64] Teach AsmPrinter about GlobalAddress operands..
ab updated this object.
ab edited the test plan for this revision. (Show Details)
ab added subscribers: Unknown Object (MLST), t.p.northover, echristo, grosbach.
echristo accepted this revision.Mar 5 2015, 10:56 AM
echristo added a reviewer: echristo.

Looks fine as a first start. If you've missed anything then we'll get it then and this is strictly better.

Thanks!

-eric

This revision is now accepted and ready to land.Mar 5 2015, 10:56 AM
This revision was automatically updated to reflect the committed changes.