This is an archive of the discontinued LLVM Phabricator instance.

[ms] [llvm-ml] Disambiguate size directives and variable declarations
ClosedPublic

Authored by epastor on May 27 2021, 8:02 AM.

Details

Summary

MASM allows statements of the form:
<VAR> DWORD 5
to declare a variable with name <VAR>, while:
call dword ptr [<value>]
is a valid instruction. To disambiguate, we recognize size directives by the trailing "ptr" token.

As discussed in https://lists.llvm.org/pipermail/llvm-dev/2021-May/150774.html

Diff Detail

Event Timeline

epastor created this revision.May 27 2021, 8:02 AM
epastor requested review of this revision.May 27 2021, 8:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 27 2021, 8:02 AM
epastor updated this revision to Diff 348275.May 27 2021, 8:12 AM

Fix a copy/paste error

epastor edited the summary of this revision. (Show Details)Jun 5 2021, 12:42 PM
epastor added reviewers: thakis, rnk.
epastor updated this revision to Diff 350078.Jun 5 2021, 1:15 PM

Updating use of peekTok to account for macros & included files

epastor updated this revision to Diff 350661.Jun 8 2021, 10:51 AM

Add test (confirmed to fail before this patch)

rnk accepted this revision.Jun 8 2021, 12:19 PM

lgtm

This revision is now accepted and ready to land.Jun 8 2021, 12:19 PM
This revision was landed with ongoing or failed builds.Jun 8 2021, 12:46 PM
This revision was automatically updated to reflect the committed changes.