[PATCH] D74344: [ms] [llvm-ml] Add a draft MASM parser

Eric Astor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 10 10:27:54 PST 2020


epastor created this revision.
Herald added subscribers: llvm-commits, aheejin, hiraditya, mgorny.
Herald added a project: LLVM.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74344

Files:
  llvm/include/llvm/MC/MCAsmInfo.h
  llvm/include/llvm/MC/MCParser/AsmLexer.h
  llvm/include/llvm/MC/MCParser/MCAsmParser.h
  llvm/include/llvm/MC/MCStreamer.h
  llvm/include/llvm/MC/MCTargetOptions.h
  llvm/lib/MC/MCParser/AsmLexer.cpp
  llvm/lib/MC/MCParser/AsmParser.cpp
  llvm/lib/MC/MCParser/CMakeLists.txt
  llvm/lib/MC/MCParser/COFFMasmParser.cpp
  llvm/lib/MC/MCParser/MCAsmParser.cpp
  llvm/lib/MC/MCParser/MasmParser.cpp
  llvm/lib/MC/MCTargetOptions.cpp
  llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
  llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.h
  llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
  llvm/test/tools/llvm-ml/basic.test
  llvm/test/tools/llvm-ml/lit.local.cfg
  llvm/tools/llvm-ml/llvm-ml.cpp
  llvm/utils/gn/secondary/llvm/lib/MC/MCParser/BUILD.gn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74344.243622.patch
Type: text/x-patch
Size: 162401 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200210/fb4fb488/attachment-0001.bin>


More information about the llvm-commits mailing list