Fix eabi calling convention when a 64 bit value shadows r3.

Without this what was happening was:

* R3 is not marked as "used"
* ARM backend thinks it has to save it to the stack because of vaarg
* Offset computation correctly ignores it
* Offsets are wrong

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110446 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2010-08-06 15:35:32 +00:00
parent e52e9d6045
commit 55e9587469
5 changed files with 30 additions and 1 deletions

View File

@@ -275,6 +275,12 @@ public:
return Result;
}
/// Version of AllocateStack with extra register to be shadowed.
unsigned AllocateStack(unsigned Size, unsigned Align, unsigned ShadowReg) {
MarkAllocated(ShadowReg);
return AllocateStack(Size, Align);
}
// HandleByVal - Allocate a stack slot large enough to pass an argument by
// value. The size and alignment information of the argument is encoded in its
// parameter attribute.

View File

@@ -89,6 +89,13 @@ class CCAssignToStack<int size, int align> : CCAction {
int Align = align;
}
/// CCAssignToStackWithShadow - Same as CCAssignToStack, but with a register
/// to be shadowed.
class CCAssignToStackWithShadow<int size, int align, Register reg> :
CCAssignToStack<size, align> {
Register ShadowReg = reg;
}
/// CCPassByVal - This action always matches: it assigns the value to a stack
/// slot to implement ByVal aggregate parameter passing. Size and alignment
/// specify the minimum size and alignment for the stack slot.