This is an archive of the discontinued LLVM Phabricator instance.

[ms] [llvm-ml] Add a draft MASM parser
AbandonedPublic

Authored by epastor on Feb 10 2020, 10:24 AM.

Details

Reviewers
None
Summary

Many directives are unavailable, and support for others may be limited.

This first draft has preliminary support for:

  • conditional directives (including errors),
  • data allocation (unsigned types up to 8 bytes, and ALIGN),
  • equates/variables (numeric and text),
  • and procedure directives (without parameters),

as well as COMMENT, ECHO, INCLUDE, INCLUDELIB, PUBLIC, and EXTERN. Text variables (aka text macros) are expanded in-place wherever the identifier occurs.

We deliberately ignore all ml.exe processor directives.

Prominent features not yet supported:

  • structs
  • macros (both procedures and functions)
  • procedures (with specified parameters)
  • substitution & expansion operators

Diff Detail

Event Timeline

epastor created this revision.Feb 10 2020, 10:24 AM
epastor updated this revision to Diff 244879.Feb 16 2020, 7:59 AM

Final rebase (hopefully)

epastor abandoned this revision.Feb 16 2020, 1:35 PM

Accidental duplicate of D72680

llvm/lib/MC/MCParser/MCAsmParser.cpp