mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Clean up asm writer usage for x86 and msp430 to flag that the writer should
use MC instructions in the printInstruction() method via the tablegen flag for it rather than a #define prior to including the autogenerated bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115238 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
086378597d
commit
ddcf859851
@ -24,9 +24,7 @@ using namespace llvm;
|
||||
|
||||
|
||||
// Include the auto-generated portion of the assembly writer.
|
||||
#define MachineInstr MCInst
|
||||
#include "MSP430GenAsmWriter.inc"
|
||||
#undef MachineInstr
|
||||
|
||||
void MSP430InstPrinter::printInst(const MCInst *MI, raw_ostream &O) {
|
||||
printInstruction(MI, O);
|
||||
|
@ -52,6 +52,7 @@ def MSP430InstrInfo : InstrInfo;
|
||||
|
||||
def MSP430InstPrinter : AsmWriter {
|
||||
string AsmWriterClassName = "InstPrinter";
|
||||
bit isMCAsmWriter = 1;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -25,10 +25,8 @@
|
||||
using namespace llvm;
|
||||
|
||||
// Include the auto-generated portion of the assembly writer.
|
||||
#define MachineInstr MCInst
|
||||
#define GET_INSTRUCTION_NAME
|
||||
#include "X86GenAsmWriter.inc"
|
||||
#undef MachineInstr
|
||||
|
||||
void X86ATTInstPrinter::printInst(const MCInst *MI, raw_ostream &OS) {
|
||||
printInstruction(MI, OS);
|
||||
|
@ -24,10 +24,8 @@
|
||||
using namespace llvm;
|
||||
|
||||
// Include the auto-generated portion of the assembly writer.
|
||||
#define MachineInstr MCInst
|
||||
#define GET_INSTRUCTION_NAME
|
||||
#include "X86GenAsmWriter1.inc"
|
||||
#undef MachineInstr
|
||||
|
||||
void X86IntelInstPrinter::printInst(const MCInst *MI, raw_ostream &OS) {
|
||||
printInstruction(MI, OS);
|
||||
|
@ -196,10 +196,12 @@ def ATTAsmParser : AsmParser {
|
||||
def ATTAsmWriter : AsmWriter {
|
||||
string AsmWriterClassName = "ATTInstPrinter";
|
||||
int Variant = 0;
|
||||
bit isMCAsmWriter = 1;
|
||||
}
|
||||
def IntelAsmWriter : AsmWriter {
|
||||
string AsmWriterClassName = "IntelInstPrinter";
|
||||
int Variant = 1;
|
||||
bit isMCAsmWriter = 1;
|
||||
}
|
||||
|
||||
def X86 : Target {
|
||||
|
Loading…
Reference in New Issue
Block a user