mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-18 22:38:56 +00:00
Add memory printing support for PPC. Input memory operands now work with
inline asms! :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26365 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
dd26033002
commit
2c003e26e5
@ -98,6 +98,9 @@ namespace {
|
|||||||
|
|
||||||
bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
|
bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
|
||||||
unsigned AsmVariant, const char *ExtraCode);
|
unsigned AsmVariant, const char *ExtraCode);
|
||||||
|
bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
|
||||||
|
unsigned AsmVariant, const char *ExtraCode);
|
||||||
|
|
||||||
|
|
||||||
void printU5ImmOperand(const MachineInstr *MI, unsigned OpNo) {
|
void printU5ImmOperand(const MachineInstr *MI, unsigned OpNo) {
|
||||||
unsigned char value = MI->getOperand(OpNo).getImmedValue();
|
unsigned char value = MI->getOperand(OpNo).getImmedValue();
|
||||||
@ -187,7 +190,7 @@ namespace {
|
|||||||
unsigned RegNo = enumRegToMachineReg(CCReg);
|
unsigned RegNo = enumRegToMachineReg(CCReg);
|
||||||
O << (0x80 >> RegNo);
|
O << (0x80 >> RegNo);
|
||||||
}
|
}
|
||||||
// The new addressing mode printers, currently empty
|
// The new addressing mode printers.
|
||||||
void printMemRegImm(const MachineInstr *MI, unsigned OpNo) {
|
void printMemRegImm(const MachineInstr *MI, unsigned OpNo) {
|
||||||
printSymbolLo(MI, OpNo);
|
printSymbolLo(MI, OpNo);
|
||||||
O << '(';
|
O << '(';
|
||||||
@ -419,6 +422,14 @@ bool PPCAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool PPCAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
|
||||||
|
unsigned AsmVariant,
|
||||||
|
const char *ExtraCode) {
|
||||||
|
if (ExtraCode && ExtraCode[0])
|
||||||
|
return true; // Unknown modifier.
|
||||||
|
printMemRegReg(MI, OpNo);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/// printMachineInstruction -- Print out a single PowerPC MI in Darwin syntax to
|
/// printMachineInstruction -- Print out a single PowerPC MI in Darwin syntax to
|
||||||
/// the current output stream.
|
/// the current output stream.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user