diff options
Diffstat (limited to 'llvm/tools/llvm-mc/llvm-mc.cpp')
| -rw-r--r-- | llvm/tools/llvm-mc/llvm-mc.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/tools/llvm-mc/llvm-mc.cpp b/llvm/tools/llvm-mc/llvm-mc.cpp index 66b55abc4898..f3a66187dd0a 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); @@ -464,8 +469,11 @@ int main(int argc, char **argv) { std::unique_ptr<MCStreamer> Str; std::unique_ptr<MCInstrInfo> MCII(TheTarget->createMCInstrInfo()); + assert(MCII && "Unable to create instruction info!"); + std::unique_ptr<MCSubtargetInfo> STI( TheTarget->createMCSubtargetInfo(TripleName, MCPU, FeaturesStr)); + assert(STI && "Unable to create subtarget info!"); MCInstPrinter *IP = nullptr; if (FileType == OFT_AssemblyFile) { |
