mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
Add an intel syntax MCInstPrinter implementation. You can now
transcode from AT&T to intel syntax with "llvm-mc foo.s -output-asm-variant=1" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82385 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -44,6 +44,10 @@ OutputFilename("o", cl::desc("Output filename"),
|
||||
static cl::opt<bool>
|
||||
ShowEncoding("show-encoding", cl::desc("Show instruction encodings"));
|
||||
|
||||
static cl::opt<unsigned>
|
||||
OutputAsmVariant("output-asm-variant",
|
||||
cl::desc("Syntax variant to use for output printing"));
|
||||
|
||||
enum OutputFileType {
|
||||
OFT_AssemblyFile,
|
||||
OFT_ObjectFile
|
||||
@ -252,9 +256,7 @@ static int AssembleInput(const char *ProgName) {
|
||||
assert(MAI && "Unable to create target asm info!");
|
||||
|
||||
if (FileType == OFT_AssemblyFile) {
|
||||
// FIXME: Syntax Variant should be selectable somehow?
|
||||
unsigned SyntaxVariant = 0;
|
||||
IP.reset(TheTarget->createMCInstPrinter(SyntaxVariant, *MAI, *Out));
|
||||
IP.reset(TheTarget->createMCInstPrinter(OutputAsmVariant, *MAI, *Out));
|
||||
if (ShowEncoding)
|
||||
CE.reset(TheTarget->createCodeEmitter(*TM));
|
||||
Str.reset(createAsmStreamer(Ctx, *Out, *MAI, IP.get(), CE.get()));
|
||||
|
Reference in New Issue
Block a user