This is an archive of the discontinued LLVM Phabricator instance.

[MC] Support symbolic expressions in assembly directives
ClosedPublic

Authored by phosek on May 25 2016, 5:22 PM.

Details

Summary

This matches the behavior of GNU assembler which supports symbolic
expressions in absolute expressions used in assembly directives.

Diff Detail

Repository
rL LLVM

Event Timeline

phosek updated this revision to Diff 58543.May 25 2016, 5:22 PM
phosek retitled this revision from to [MC] Remove the leftover warning check.
phosek updated this object.
phosek added a reviewer: rafael.
phosek set the repository for this revision to rL LLVM.

This should fix the error I introduced in the previous change.

This should test failure I introduced in D8072, if someone can review the change, I'd be happy to land this to unbreak the tree.

rafael edited edge metadata.May 26 2016, 4:50 AM

How about using -filetype=obj? You should still get a warning with that, no?

phosek updated this revision to Diff 58678.May 26 2016, 1:12 PM
phosek retitled this revision from [MC] Remove the leftover warning check to [MC] Use obj output for .fill tests where needed.
phosek updated this object.
phosek edited edge metadata.

That's a better solution.

Shall I mark this as accepted?

phosek updated this revision to Diff 58756.EditedMay 26 2016, 10:53 PM
phosek retitled this revision from [MC] Use obj output for .fill tests where needed to [MC] Support symbolic expressions in assembly directives.
phosek updated this object.

The original change was reverted because of the test failure, so I've updated this revision to include both the original change and the updated test which is now passing.

Up to you. Using phab is optional, so just a lgtm in the list is sufficient.

Lgtm. Just be sure to run check-all before committing :-)

This revision was automatically updated to reflect the committed changes.

This is strange, I did run all the test several times on my machine (Ubuntu x86-64) and all tests passed, but after landing the change, I got several failures on different platforms such as OS X . The source of the failure is unclear to me as the expression emitted for .fill 1, 1, 10 is .fill 1, 1, 0x0 instead of .fill 1, 1, 0xa. I'm not sure if it's related to the platform, but I'll get an OS X machine and try to replicate the failure.

I should have also mentioned that I've reverted the change myself to avoid further build breakages, sorry about all the issues related to this change.