summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc/SparcRegInfo.cpp
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2003-06-06 09:52:23 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2003-06-06 09:52:23 +0000
commit2969ec52661e8b3a878650b3ef93854dc4c46da2 (patch)
treea96f347eb3cf8eb600876ea7c9789894792759f5 /llvm/lib/Target/Sparc/SparcRegInfo.cpp
parentf77c991d3a80e273f2df59a171857fc8646593d4 (diff)
downloadbcm5719-llvm-2969ec52661e8b3a878650b3ef93854dc4c46da2.tar.gz
bcm5719-llvm-2969ec52661e8b3a878650b3ef93854dc4c46da2.zip
* Changed Bcc instructions to behave like BPcc instructions
* BPA and BPN do not take a %cc register as a parameter * SLL/SRL/SRA{r,i}5 are there for a reason - they are ONLY 32-bit instructions * Likewise, SLL/SRL/SRAX{r,i}6 are only 64-bit * Added WRCCR{r,i} opcodes llvm-svn: 6655
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcRegInfo.cpp')
-rw-r--r--llvm/lib/Target/Sparc/SparcRegInfo.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Target/Sparc/SparcRegInfo.cpp b/llvm/lib/Target/Sparc/SparcRegInfo.cpp
index 1cc274de00f..780a5578c88 100644
--- a/llvm/lib/Target/Sparc/SparcRegInfo.cpp
+++ b/llvm/lib/Target/Sparc/SparcRegInfo.cpp
@@ -1068,7 +1068,8 @@ UltraSparcRegInfo::cpReg2RegMI(std::vector<MachineInstr*>& mvec,
unsigned SrcReg,
unsigned DestReg,
int RegType) const {
- assert( ((int)SrcReg != getInvalidRegNum()) && ((int)DestReg != getInvalidRegNum()) &&
+ assert( ((int)SrcReg != getInvalidRegNum()) &&
+ ((int)DestReg != getInvalidRegNum()) &&
"Invalid Register");
MachineInstr * MI = NULL;
@@ -1085,7 +1086,8 @@ UltraSparcRegInfo::cpReg2RegMI(std::vector<MachineInstr*>& mvec,
// Use DestReg+1 to get the name "%ccr" instead of "%xcc" for WRCCR
assert(getRegType(SrcReg) == IntRegType
&& "Can only copy CC reg to/from integer reg");
- MI = BuildMI(V9::WRCCR, 2).addMReg(SrcReg).addMReg(DestReg+1, MOTy::Def);
+ MI = BuildMI(V9::WRCCRr, 2).addMReg(SrcReg)
+ .addMReg(SparcIntRegClass::g0).addMReg(DestReg+1, MOTy::Def);
}
break;
@@ -1212,7 +1214,8 @@ UltraSparcRegInfo::cpMem2RegMI(std::vector<MachineInstr*>& mvec,
cpMem2RegMI(mvec, SrcPtrReg, Offset, scratchReg, IntRegType);
// Use DestReg+1 to get the name "%ccr" instead of "%xcc" for WRCCR
- MI = BuildMI(V9::WRCCR, 2).addMReg(scratchReg).addMReg(DestReg+1,MOTy::Def);
+ MI = BuildMI(V9::WRCCRr, 2).addMReg(scratchReg)
+ .addMReg(SparcIntRegClass::g0).addMReg(DestReg+1,MOTy::Def);
break;
case FloatCCRegType: {
OpenPOWER on IntegriCloud