mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-06 09:44:39 +00:00
Add support for printing the sse scalar comparison instruction mnemonics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22440 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
afc545616a
commit
6c7cb29038
@ -143,6 +143,22 @@ void X86ATTAsmPrinter::printOp(const MachineOperand &MO, bool isCallOp) {
|
||||
}
|
||||
}
|
||||
|
||||
void X86ATTAsmPrinter::printSSECC(const MachineInstr *MI, unsigned Op,
|
||||
MVT::ValueType VT) {
|
||||
unsigned char value = MI->getOperand(Op).getImmedValue();
|
||||
assert(value <= 7 && "Invalid ssecc argument!");
|
||||
switch (value) {
|
||||
case 0: O << "eq"; break;
|
||||
case 1: O << "lt"; break;
|
||||
case 2: O << "le"; break;
|
||||
case 3: O << "unord"; break;
|
||||
case 4: O << "neq"; break;
|
||||
case 5: O << "nlt"; break;
|
||||
case 6: O << "nle"; break;
|
||||
case 7: O << "ord"; break;
|
||||
}
|
||||
}
|
||||
|
||||
void X86ATTAsmPrinter::printMemReference(const MachineInstr *MI, unsigned Op){
|
||||
assert(isMem(MI, Op) && "Invalid memory reference!");
|
||||
|
||||
|
@ -51,6 +51,7 @@ struct X86ATTAsmPrinter : public X86SharedAsmPrinter {
|
||||
|
||||
void printMachineInstruction(const MachineInstr *MI);
|
||||
void printOp(const MachineOperand &MO, bool isCallOperand = false);
|
||||
void printSSECC(const MachineInstr *MI, unsigned Op, MVT::ValueType VT);
|
||||
void printMemReference(const MachineInstr *MI, unsigned Op);
|
||||
bool runOnMachineFunction(MachineFunction &F);
|
||||
};
|
||||
|
@ -58,6 +58,22 @@ bool X86IntelAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void X86IntelAsmPrinter::printSSECC(const MachineInstr *MI, unsigned Op,
|
||||
MVT::ValueType VT) {
|
||||
unsigned char value = MI->getOperand(Op).getImmedValue();
|
||||
assert(value <= 7 && "Invalid ssecc argument!");
|
||||
switch (value) {
|
||||
case 0: O << "eq"; break;
|
||||
case 1: O << "lt"; break;
|
||||
case 2: O << "le"; break;
|
||||
case 3: O << "unord"; break;
|
||||
case 4: O << "neq"; break;
|
||||
case 5: O << "nlt"; break;
|
||||
case 6: O << "nle"; break;
|
||||
case 7: O << "ord"; break;
|
||||
}
|
||||
}
|
||||
|
||||
void X86IntelAsmPrinter::printOp(const MachineOperand &MO,
|
||||
bool elideOffsetKeyword /* = false */) {
|
||||
const MRegisterInfo &RI = *TM.getRegisterInfo();
|
||||
|
@ -70,6 +70,7 @@ struct X86IntelAsmPrinter : public X86SharedAsmPrinter {
|
||||
|
||||
void printMachineInstruction(const MachineInstr *MI);
|
||||
void printOp(const MachineOperand &MO, bool elideOffsetKeyword = false);
|
||||
void printSSECC(const MachineInstr *MI, unsigned Op, MVT::ValueType VT);
|
||||
void printMemReference(const MachineInstr *MI, unsigned Op);
|
||||
bool runOnMachineFunction(MachineFunction &F);
|
||||
bool doInitialization(Module &M);
|
||||
|
Loading…
x
Reference in New Issue
Block a user