mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Add bunch of 32-bit patterns... Uffff :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75926 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -50,10 +50,21 @@ bool SystemZInstrInfo::copyRegToReg(MachineBasicBlock &MBB,
|
||||
DebugLoc DL = DebugLoc::getUnknownLoc();
|
||||
if (I != MBB.end()) DL = I->getDebugLoc();
|
||||
|
||||
if (DestRC == SrcRC) {
|
||||
// Determine if DstRC and SrcRC have a common superclass.
|
||||
const TargetRegisterClass *CommonRC = DestRC;
|
||||
if (DestRC == SrcRC)
|
||||
/* Same regclass for source and dest */;
|
||||
else if (CommonRC->hasSuperClass(SrcRC))
|
||||
CommonRC = SrcRC;
|
||||
else if (!CommonRC->hasSubClass(SrcRC))
|
||||
CommonRC = 0;
|
||||
|
||||
if (CommonRC) {
|
||||
unsigned Opc;
|
||||
if (DestRC == &SystemZ::GR64RegClass) {
|
||||
if (CommonRC == &SystemZ::GR64RegClass) {
|
||||
Opc = SystemZ::MOV64rr;
|
||||
} else if (CommonRC == &SystemZ::GR32RegClass) {
|
||||
Opc = SystemZ::MOV32rr;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -74,6 +85,7 @@ SystemZInstrInfo::isMoveInstr(const MachineInstr& MI,
|
||||
switch (MI.getOpcode()) {
|
||||
default:
|
||||
return false;
|
||||
case SystemZ::MOV32rr:
|
||||
case SystemZ::MOV64rr:
|
||||
assert(MI.getNumOperands() >= 2 &&
|
||||
MI.getOperand(0).isReg() &&
|
||||
|
||||
Reference in New Issue
Block a user