llvm-project/llvm/lib/Target/X86/MCTargetDesc
Eric Astor ee2c0f76d7 [ms] [llvm-ml] Add a draft MASM parser
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

Conditional directives are complicated by the fact that "ifdef rax" is a valid way to check if a file is being assembled for a 64-bit x86 processor; we add support for "ifdef <register>" in general, which requires adding a tryParseRegister method to all MCTargetAsmParsers. (Some targets require backtracking in the non-register case.)

Reviewers: rnk, thakis

Reviewed By: thakis

Subscribers: kerbowa, merge_guards_bot, wuzish, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, mgorny, sbc100, jgravelle-google, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72680
2020-02-16 12:30:46 -05:00
..
CMakeLists.txt [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
LLVMBuild.txt [X86] Move InstPrinter files to MCTargetDesc. NFC 2019-05-10 23:24:38 +00:00
X86ATTInstPrinter.cpp [MC] Add parameter `Address` to MCInstrPrinter::printInstruction 2020-01-06 20:44:14 -08:00
X86ATTInstPrinter.h [MC] Add parameter `Address` to MCInstrPrinter::printInstruction 2020-01-06 20:44:14 -08:00
X86AsmBackend.cpp [NFC] Fix helptext for opt/llc after https://reviews.llvm.org/D68411 2020-02-03 12:31:42 +08:00
X86BaseInfo.h [X86] Add function isPrefix() 2020-01-30 14:11:50 +08:00
X86ELFObjectWriter.cpp [MC] Minor cleanup to MCFixup::Kind handling. NFC. 2019-08-23 01:00:55 +00:00
X86FixupKinds.h
X86InstComments.cpp [X86] X86InstComments - add FMA4 comments 2020-02-08 17:02:00 +00:00
X86InstComments.h [X86] Move InstPrinter files to MCTargetDesc. NFC 2019-05-10 23:24:38 +00:00
X86InstPrinterCommon.cpp [X86] Add VP2INTERSECT instructions 2019-05-31 02:50:41 +00:00
X86InstPrinterCommon.h [X86] Add VP2INTERSECT instructions 2019-05-31 02:50:41 +00:00
X86IntelInstPrinter.cpp [MC] Add parameter `Address` to MCInstrPrinter::printInstruction 2020-01-06 20:44:14 -08:00
X86IntelInstPrinter.h [MC] Add parameter `Address` to MCInstrPrinter::printInstruction 2020-01-06 20:44:14 -08:00
X86MCAsmInfo.cpp [ms] [llvm-ml] Add a draft MASM parser 2020-02-16 12:30:46 -05:00
X86MCAsmInfo.h [ms] [llvm-ml] Add a draft MASM parser 2020-02-16 12:30:46 -05:00
X86MCCodeEmitter.cpp [llvm-mc] - Produce R_X86_64_PLT32 relocation for branches with JCC opcodes too. 2020-01-20 11:42:19 +03:00
X86MCExpr.h [X86] Move InstPrinter files to MCTargetDesc. NFC 2019-05-10 23:24:38 +00:00
X86MCTargetDesc.cpp [ms] [llvm-ml] Add a draft MASM parser 2020-02-16 12:30:46 -05:00
X86MCTargetDesc.h [X86][Btver2] Fix latency and throughput of CMPXCHG instructions. 2019-08-20 10:23:55 +00:00
X86MachObjectWriter.cpp [MC] Minor cleanup to MCFixup::Kind handling. NFC. 2019-08-23 01:00:55 +00:00
X86TargetStreamer.h
X86WinCOFFObjectWriter.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
X86WinCOFFStreamer.cpp [MC] Avoid crashes from improperly nested or wrong target .seh_handlerdata directives 2019-08-30 22:25:55 +00:00
X86WinCOFFTargetStreamer.cpp [MCStreamer] De-capitalize EmitValue EmitIntValue{,InHex} 2020-02-14 23:08:40 -08:00