diff options
author | Eric Astor <epastor@google.com> | 2020-09-29 16:57:25 -0400 |
---|---|---|
committer | Eric Astor <epastor@google.com> | 2020-09-29 16:57:32 -0400 |
commit | c65e9e71eb7612b297a8bfd3e74759d55cfc7bf4 (patch) | |
tree | 8971b2fccc5dee477268926337efe6badf181a8e /llvm/tools/llvm-mc/llvm-mc.cpp | |
parent | 6b70a83d9cc0ec17aa4bc199081c0a51e65be6dd (diff) | |
download | llvm-c65e9e71eb7612b297a8bfd3e74759d55cfc7bf4.zip llvm-c65e9e71eb7612b297a8bfd3e74759d55cfc7bf4.tar.gz llvm-c65e9e71eb7612b297a8bfd3e74759d55cfc7bf4.tar.bz2 |
[ms] [llvm-ml] Add MASM hex float support
Implement MASM's syntax for specifying floats in raw hexadecimal bytes.
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D87401
Diffstat (limited to 'llvm/tools/llvm-mc/llvm-mc.cpp')
-rw-r--r-- | llvm/tools/llvm-mc/llvm-mc.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/tools/llvm-mc/llvm-mc.cpp b/llvm/tools/llvm-mc/llvm-mc.cpp index 66b55ab..f8352f3 100644 --- a/llvm/tools/llvm-mc/llvm-mc.cpp +++ b/llvm/tools/llvm-mc/llvm-mc.cpp @@ -169,6 +169,10 @@ static cl::opt<bool> LexMasmIntegers( "masm-integers", cl::desc("Enable binary and hex masm integers (0b110 and 0ABCh)")); +static cl::opt<bool> LexMasmHexFloats( + "masm-hexfloats", + cl::desc("Enable MASM-style hex float initializers (3F800000r)")); + static cl::opt<bool> NoExecStack("no-exec-stack", cl::desc("File doesn't need an exec stack")); @@ -300,6 +304,7 @@ static int AssembleInput(const char *ProgName, const Target *TheTarget, Parser->setShowParsedOperands(ShowInstOperands); Parser->setTargetParser(*TAP); Parser->getLexer().setLexMasmIntegers(LexMasmIntegers); + Parser->getLexer().setLexMasmHexFloats(LexMasmHexFloats); int Res = Parser->Run(NoInitialTextSection); |