Page MenuHomePhabricator

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

Authored by epastor on Thu, May 27, 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.Thu, May 27, 8:02 AM
epastor requested review of this revision.Thu, May 27, 8:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptThu, May 27, 8:02 AM
epastor updated this revision to Diff 348275.Thu, May 27, 8:12 AM

Fix a copy/paste error

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

Updating use of peekTok to account for macros & included files

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

Add test (confirmed to fail before this patch)

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

lgtm

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