aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/SparcV9/SparcV9RegInfo.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
commit9d47866497683a99ced46db88b3729616ee219a5 (patch)
treec0225381b7e3fd1c6a55d09d34dbb5937e659b6c /lib/Target/SparcV9/SparcV9RegInfo.cpp
parent91014f6b0cec1c517d6da14787d9f2985ab40277 (diff)
downloadexternal_llvm-9d47866497683a99ced46db88b3729616ee219a5.zip
external_llvm-9d47866497683a99ced46db88b3729616ee219a5.tar.gz
external_llvm-9d47866497683a99ced46db88b3729616ee219a5.tar.bz2
Fixed a bug with pervious ColorCallArg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1278 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/SparcV9RegInfo.cpp')
-rw-r--r--lib/Target/SparcV9/SparcV9RegInfo.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/Target/SparcV9/SparcV9RegInfo.cpp b/lib/Target/SparcV9/SparcV9RegInfo.cpp
index b576d05..16e3b9f 100644
--- a/lib/Target/SparcV9/SparcV9RegInfo.cpp
+++ b/lib/Target/SparcV9/SparcV9RegInfo.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)