aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-ml/llvm-ml.cpp
AgeCommit message (Collapse)AuthorFilesLines
2020-02-25[MC] Default MCContext::UseNamesOnTempLabels to false and only set it to ↵Fangrui Song1-3/+0
true for MCAsmStreamer Only MCAsmStreamer (assembly output) needs to keep names of temporary labels created by MCContext::createTempSymbol(). This change made the rL236642 optimization available for cc2as and probably some other users. This eliminates a behavior difference between llvm-mc -filetype=obj and cc1as, which caused https://reviews.llvm.org/D74006#1890487 Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D75097
2020-02-16[ms] [llvm-ml] Add a draft MASM parserEric Astor1-1/+3
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-01-28Make llvm::StringRef to std::string conversions explicit.Benjamin Kramer1-1/+1
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here. This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies. This doesn't actually modify StringRef yet, I'll do that in a follow-up.
2020-01-20[ms] [llvm-ml] Add placeholder for llvm-ml, based on llvm-mcEric Astor1-0/+381
As discussed on the mailing list, I plan to introduce an ml-compatible MASM assembler as part of providing more of the Windows build tools. This will be similar to llvm-mc, but with different command-line parameters. This placeholder is purely a stripped-down version of llvm-mc; we'll eventually add support for the Microsoft-style command-line flags, and back it with a MASM parser. Relanding this revision after fixing ARM-compatibility issues. Reviewers: rnk, thakis, RKSimon Reviewed By: thakis, RKSimon Differential Revision: https://reviews.llvm.org/D72679
2020-01-18Revert "[ms] [llvm-ml] Add placeholder for llvm-ml, based on llvm-mc"Eric Astor1-381/+0
This reverts commit 22af2cbefc86dbef6e11ddaa96a08956e0baf22b, due to breakages on ARM platforms.
2020-01-17[ms] [llvm-ml] Add placeholder for llvm-ml, based on llvm-mcEric Astor1-0/+381
Summary: As discussed on the mailing list, I plan to introduce an ml-compatible MASM assembler as part of providing more of the Windows build tools. This will be similar to llvm-mc, but with different command-line parameters. This placeholder is purely a stripped-down version of llvm-mc; we'll eventually add support for the Microsoft-style command-line flags, and back it with a MASM parser. Reviewers: rnk, thakis Reviewed By: thakis Subscribers: merge_guards_bot, mgorny, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D72679