mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Make intel asmprinter child of generic asmprinter, not x86 shared asm printer. This leads to some code duplication, which will be resolved later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52858 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -73,23 +73,6 @@ struct VISIBILITY_HIDDEN X86SharedAsmPrinter : public AsmPrinter {
|
||||
|
||||
// Necessary for dllexport support
|
||||
StringSet<> DLLExportedFns, DLLExportedGVs;
|
||||
|
||||
inline static bool isScale(const MachineOperand &MO) {
|
||||
return MO.isImmediate() &&
|
||||
(MO.getImm() == 1 || MO.getImm() == 2 ||
|
||||
MO.getImm() == 4 || MO.getImm() == 8);
|
||||
}
|
||||
|
||||
inline static bool isMem(const MachineInstr *MI, unsigned Op) {
|
||||
if (MI->getOperand(Op).isFrameIndex()) return true;
|
||||
return Op+4 <= MI->getNumOperands() &&
|
||||
MI->getOperand(Op ).isRegister() && isScale(MI->getOperand(Op+1)) &&
|
||||
MI->getOperand(Op+2).isRegister() &&
|
||||
(MI->getOperand(Op+3).isImmediate() ||
|
||||
MI->getOperand(Op+3).isGlobalAddress() ||
|
||||
MI->getOperand(Op+3).isConstantPoolIndex() ||
|
||||
MI->getOperand(Op+3).isJumpTableIndex());
|
||||
}
|
||||
};
|
||||
|
||||
} // end namespace llvm
|
||||
|
Reference in New Issue
Block a user