diff options
author | Nate Begeman <natebegeman@mac.com> | 2004-08-27 04:28:10 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2004-08-27 04:28:10 +0000 |
commit | fa2bf42539e7b0a92d763511e6fd658268dafe9b (patch) | |
tree | b71682b861244cf68a6ce8b4e8dc7e4ca0da5eff /llvm | |
parent | 7ebfde2be63fb649f3a38d0d032a5f0209cf5a55 (diff) | |
download | bcm5719-llvm-fa2bf42539e7b0a92d763511e6fd658268dafe9b.tar.gz bcm5719-llvm-fa2bf42539e7b0a92d763511e6fd658268dafe9b.zip |
Register sizes are in bits, not bytes
llvm-svn: 16070
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/CodeGen/PrologEpilogInserter.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/PPC32RegisterInfo.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/PPC64RegisterInfo.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index c71755612ec..1aee69f9cca 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -181,11 +181,11 @@ void PEI::calculateCallerSavedRegisters(MachineFunction &Fn) { int FrameIdx; if (FixedSlot == FixedSpillSlots+NumFixedSpillSlots) { // Nope, just spill it anywhere convenient. - FrameIdx = FFI->CreateStackObject(RegInfo->getSpillSize(Reg), + FrameIdx = FFI->CreateStackObject(RegInfo->getSpillSize(Reg)/8, RegInfo->getSpillAlignment(Reg)/8); } else { // Spill it to the stack where we must. - FrameIdx = FFI->CreateFixedObject(RegInfo->getSpillSize(Reg), + FrameIdx = FFI->CreateFixedObject(RegInfo->getSpillSize(Reg)/8, FixedSlot->second); } StackSlots.push_back(FrameIdx); diff --git a/llvm/lib/Target/PowerPC/PPC32RegisterInfo.cpp b/llvm/lib/Target/PowerPC/PPC32RegisterInfo.cpp index b3a9da069ff..bebb8688418 100644 --- a/llvm/lib/Target/PowerPC/PPC32RegisterInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPC32RegisterInfo.cpp @@ -238,7 +238,7 @@ void PPC32RegisterInfo::emitPrologue(MachineFunction &MF) const { // Add the size of R1 to NumBytes size for the store of R1 to the bottom // of the stack and round the size to a multiple of the alignment. unsigned Align = MF.getTarget().getFrameInfo()->getStackAlignment(); - unsigned GPRSize = getSpillSize(PPC::R1); + unsigned GPRSize = getSpillSize(PPC::R1)/8; unsigned Size = hasFP(MF) ? GPRSize + GPRSize : GPRSize; NumBytes = (NumBytes+Size+Align-1)/Align*Align; @@ -278,7 +278,7 @@ void PPC32RegisterInfo::emitEpilogue(MachineFunction &MF, // Get the number of bytes allocated from the FrameInfo... unsigned NumBytes = MFI->getStackSize(); - unsigned GPRSize = getSpillSize(PPC::R31); + unsigned GPRSize = getSpillSize(PPC::R31)/8; if (NumBytes != 0) { if (hasFP(MF)) { diff --git a/llvm/lib/Target/PowerPC/PPC64RegisterInfo.cpp b/llvm/lib/Target/PowerPC/PPC64RegisterInfo.cpp index 304f28c1bdd..774e661e62f 100644 --- a/llvm/lib/Target/PowerPC/PPC64RegisterInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPC64RegisterInfo.cpp @@ -240,7 +240,7 @@ void PPC64RegisterInfo::emitPrologue(MachineFunction &MF) const { // Add the size of R1 to NumBytes size for the store of R1 to the bottom // of the stack and round the size to a multiple of the alignment. unsigned Align = MF.getTarget().getFrameInfo()->getStackAlignment(); - unsigned GPRSize = getSpillSize(PPC::R1); + unsigned GPRSize = getSpillSize(PPC::R1)/8; unsigned Size = hasFP(MF) ? GPRSize + GPRSize : GPRSize; NumBytes = (NumBytes+Size+Align-1)/Align*Align; |