mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
use jump table operand flags in asm printer instead of "magic predicates"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74310 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d2deed0091
commit
89ca575c31
@ -455,13 +455,25 @@ void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
|
||||
O << TAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber() << '_'
|
||||
<< MO.getIndex();
|
||||
|
||||
if (TM.getRelocationModel() == Reloc::PIC_) {
|
||||
if (Subtarget->isPICStyleStub()) {
|
||||
O << '-';
|
||||
PrintPICBaseSymbol();
|
||||
} else if (Subtarget->isPICStyleGOT()) {
|
||||
O << "@GOTOFF";
|
||||
switch (MO.getTargetFlags()) {
|
||||
default:
|
||||
assert(0 && "Unknown target flag on jump table operand");
|
||||
case X86II::MO_NO_FLAG:
|
||||
// FIXME: REMOVE EVENTUALLY.
|
||||
if (TM.getRelocationModel() == Reloc::PIC_) {
|
||||
assert(!Subtarget->isPICStyleStub() &&
|
||||
!Subtarget->isPICStyleGOT() &&
|
||||
"Should have operand flag!");
|
||||
}
|
||||
|
||||
break;
|
||||
case X86II::MO_PIC_BASE_OFFSET:
|
||||
O << '-';
|
||||
PrintPICBaseSymbol();
|
||||
break;
|
||||
case X86II::MO_GOTOFF:
|
||||
O << "@GOTOFF";
|
||||
break;
|
||||
}
|
||||
|
||||
if (isMemOp && Subtarget->isPICStyleRIPRel() && !NotRIPRel)
|
||||
|
Loading…
x
Reference in New Issue
Block a user