summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc/SparcRegInfo.cpp
diff options
context:
space:
mode:
authorRuchira Sasanka <sasanka@students.uiuc.edu>2001-11-12 20:54:19 +0000
committerRuchira Sasanka <sasanka@students.uiuc.edu>2001-11-12 20:54:19 +0000
commit20e105f4b18c248ed11d8f3a44801536f0d310a8 (patch)
treed9c72fd74aac68db88e7567100febfa07b98c319 /llvm/lib/Target/Sparc/SparcRegInfo.cpp
parent24e29431bc02b8100eb68718c67e979a6f63e86e (diff)
downloadbcm5719-llvm-20e105f4b18c248ed11d8f3a44801536f0d310a8.tar.gz
bcm5719-llvm-20e105f4b18c248ed11d8f3a44801536f0d310a8.zip
Fixed a bug with pervious ColorCallArg
llvm-svn: 1278
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcRegInfo.cpp')
-rw-r--r--llvm/lib/Target/Sparc/SparcRegInfo.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/llvm/lib/Target/Sparc/SparcRegInfo.cpp b/llvm/lib/Target/Sparc/SparcRegInfo.cpp
index b576d05e6fa..16e3b9f0380 100644
--- a/llvm/lib/Target/Sparc/SparcRegInfo.cpp
+++ b/llvm/lib/Target/Sparc/SparcRegInfo.cpp
@@ -655,9 +655,11 @@ void UltraSparcRegInfo::colorCallArgs(const MachineInstr *const CallMI,
// the LR is colored with UniLRReg but has to go into UniArgReg
// to pass it as an argument
- if( isArgInReg )
+ if( isArgInReg ) {
AdMI = cpReg2RegMI(UniLRReg, UniArgReg, RegType );
-
+ AddedInstrnsBefore.push_back( AdMI );
+ }
+
else {
// Now, we have to pass the arg on stack. Since LR received a register
// we just have to move that register to the stack position where
@@ -666,13 +668,16 @@ void UltraSparcRegInfo::colorCallArgs(const MachineInstr *const CallMI,
int argOffset = PRA.mcInfo.allocateOptionalArg(target, LR->getType());
AdMI = cpReg2MemMI(UniLRReg, getStackPointer(), argOffset, RegType );
+
+ // Now add the instruction. We can directly add to
+ // CallAI->InstrnsBefore since we are just saving a reg on stack
+ //
+ CallAI->InstrnsBefore.push_back( AdMI );
+
+ //cerr << "\nCaution: Passing a reg on stack";
}
- // Now add the instruction. We can directly add to
- // CallAI->InstrnsBefore since we are just saving a reg on stack
- //
- CallAI->InstrnsBefore.push_back( AdMI );
- //cerr << "\nCaution: Passing a reg on stack";
+
}
else { // LR is not colored (i.e., spilled)
OpenPOWER on IntegriCloud