This is an archive of the discontinued LLVM Phabricator instance.

[X86] Support 'offset' when parsing intel syntax through llvm-mc or gcc inline assembly
AbandonedPublic

Authored by craig.topper on Jan 22 2019, 11:35 AM.

Details

Summary

Currently we only support the "offset" keyword during the first pass on MS style inline assembly. This means its unvailable to gcc inline assembly or just using llvm-mc. gas seems to support this when parsing intel syntax.

This patch adds support outside of the first pass of MS inline assembly. I left the first pass MS inline assembly code alone for now and added a fixme. I'm not sure if its correct or not. It looks to delete the 'offset' keyword as part of its rewrite, but that seems wrong.

Diff Detail

Event Timeline

craig.topper created this revision.Jan 22 2019, 11:35 AM
rnk added a comment.Jan 22 2019, 11:47 AM

This patch adds support outside of the first pass of MS inline assembly. I left the first pass MS inline assembly code alone for now and added a fixme. I'm not sure if its correct or not. It looks to delete the 'offset' keyword as part of its rewrite, but that seems wrong.

I think you're right, we probably don't need the rewrite if MC can just parse it directly after this change. I think it's fine to leave the rewrite for now, but we should remove it if we can in a followup.

rnk accepted this revision.Jan 23 2019, 11:46 AM

lgtm

I meant to approve with the last comment, but I must have forgot or misclicked.

This revision is now accepted and ready to land.Jan 23 2019, 11:46 AM
craig.topper abandoned this revision.Jan 23 2019, 12:26 PM

I think we need to finish D37461 instead.