mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
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:
@@ -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.
|
||||
|
@@ -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.
|
||||
|
Reference in New Issue
Block a user