llvm-svn: 76053
This commit is contained in:
Anton Korobeynikov 2009-07-16 14:31:32 +00:00
parent 3ae30e08ef
commit 201d49d56a
1 changed files with 29 additions and 91 deletions

View File

@ -343,106 +343,44 @@ SystemZInstrInfo::InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
const TargetInstrDesc& const TargetInstrDesc&
SystemZInstrInfo::getBrCond(SystemZCC::CondCodes CC) const { SystemZInstrInfo::getBrCond(SystemZCC::CondCodes CC) const {
unsigned Opc;
switch (CC) { switch (CC) {
default: default:
assert(0 && "Unknown condition code!"); assert(0 && "Unknown condition code!");
case SystemZCC::O: case SystemZCC::O: return get(SystemZ::JO);
Opc = SystemZ::JO; case SystemZCC::H: return get(SystemZ::JH);
break; case SystemZCC::NLE: return get(SystemZ::JNLE);
case SystemZCC::H: case SystemZCC::L: return get(SystemZ::JL);
Opc = SystemZ::JH; case SystemZCC::NHE: return get(SystemZ::JNHE);
break; case SystemZCC::LH: return get(SystemZ::JLH);
case SystemZCC::NLE: case SystemZCC::NE: return get(SystemZ::JNE);
Opc = SystemZ::JNLE; case SystemZCC::E: return get(SystemZ::JE);
break; case SystemZCC::NLH: return get(SystemZ::JNLH);
case SystemZCC::L: case SystemZCC::HE: return get(SystemZ::JHE);
Opc = SystemZ::JL; case SystemZCC::NL: return get(SystemZ::JNL);
break; case SystemZCC::LE: return get(SystemZ::JLE);
case SystemZCC::NHE: case SystemZCC::NH: return get(SystemZ::JNH);
Opc = SystemZ::JNHE; case SystemZCC::NO: return get(SystemZ::JNO);
break;
case SystemZCC::LH:
Opc = SystemZ::JLH;
break;
case SystemZCC::NE:
Opc = SystemZ::JNE;
break;
case SystemZCC::E:
Opc = SystemZ::JE;
break;
case SystemZCC::NLH:
Opc = SystemZ::JNLH;
break;
case SystemZCC::HE:
Opc = SystemZ::JHE;
break;
case SystemZCC::NL:
Opc = SystemZ::JNL;
break;
case SystemZCC::LE:
Opc = SystemZ::JLE;
break;
case SystemZCC::NH:
Opc = SystemZ::JNH;
break;
case SystemZCC::NO:
Opc = SystemZ::JNO;
break;
} }
return get(Opc);
} }
const TargetInstrDesc& const TargetInstrDesc&
SystemZInstrInfo::getLongDispOpc(unsigned Opc) const { SystemZInstrInfo::getLongDispOpc(unsigned Opc) const {
switch (Opc) { switch (Opc) {
case SystemZ::MOV32mr: case SystemZ::MOV32mr: return get(SystemZ::MOV32mry);
Opc = SystemZ::MOV32mry; case SystemZ::MOV32rm: return get(SystemZ::MOV32rmy);
break; case SystemZ::MOVSX32rm16: return get(SystemZ::MOVSX32rm16y);
case SystemZ::MOV32rm: case SystemZ::MOV32m8r: return get(SystemZ::MOV32m8ry);
Opc = SystemZ::MOV32rmy; case SystemZ::MOV32m16r: return get(SystemZ::MOV32m16ry);
break; case SystemZ::MOV64m8r: return get(SystemZ::MOV64m8ry);
case SystemZ::MOVSX32rm16: case SystemZ::MOV64m16r: return get(SystemZ::MOV64m16ry);
Opc = SystemZ::MOVSX32rm16y; case SystemZ::MOV64m32r: return get(SystemZ::MOV64m32ry);
break; case SystemZ::MOV8mi: return get(SystemZ::MOV8miy);
case SystemZ::MOV32m8r: case SystemZ::MUL32rm: return get(SystemZ::MUL32rmy);
Opc = SystemZ::MOV32m8ry; case SystemZ::CMP32rm: return get(SystemZ::CMP32rmy);
break; case SystemZ::UCMP32rm: return get(SystemZ::UCMP32rmy);
case SystemZ::MOV32m16r: case SystemZ::FMOV32mr: return get(SystemZ::FMOV32mry);
Opc = SystemZ::MOV32m16ry; case SystemZ::FMOV64mr: return get(SystemZ::FMOV64mry);
break; default: return get(Opc);
case SystemZ::MOV64m8r: }
Opc = SystemZ::MOV64m8ry;
break;
case SystemZ::MOV64m16r:
Opc = SystemZ::MOV64m16ry;
break;
case SystemZ::MOV64m32r:
Opc = SystemZ::MOV64m32ry;
break;
case SystemZ::MOV8mi:
Opc = SystemZ::MOV8miy;
break;
case SystemZ::MUL32rm:
Opc = SystemZ::MUL32rmy;
break;
case SystemZ::CMP32rm:
Opc = SystemZ::CMP32rmy;
break;
case SystemZ::UCMP32rm:
Opc = SystemZ::UCMP32rmy;
break;
case SystemZ::FMOV32mr:
Opc = SystemZ::FMOV32mry;
break;
case SystemZ::FMOV64mr:
Opc = SystemZ::FMOV64mry;
break;
default:
break;
}
return get(Opc);
} }