mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[arm] Use correct register for return value; also don't bother saving full set of callee-saved registers using PUSH, they'll be saved individually
This commit is contained in:
parent
af0b642859
commit
89d7a76a6b
@ -81,12 +81,11 @@ Assembler::genPrologue()
|
||||
// NJ_RESV_OFFSET is space at the top of the stack for us
|
||||
// to use for parameter passing (8 bytes at the moment)
|
||||
uint32_t stackNeeded = STACK_GRANULARITY * _activation.highwatermark + NJ_STACK_OFFSET;
|
||||
uint32_t savingCount = 0;
|
||||
|
||||
uint32_t savingMask = SavedRegs | rmask(FP) | rmask(LR);
|
||||
savingCount = NumSavedRegs+2;
|
||||
uint32_t savingMask = rmask(FP) | rmask(LR);
|
||||
uint32_t savingCount = 2;
|
||||
|
||||
// so for alignment purposes we've pushed return addr, fp, and savingCount registers
|
||||
// so for alignment purposes we've pushed return addr and fp
|
||||
uint32_t stackPushed = STACK_GRANULARITY * savingCount;
|
||||
uint32_t aligned = alignUp(stackNeeded + stackPushed, NJ_ALIGN_STACK);
|
||||
int32_t amt = aligned - stackPushed;
|
||||
@ -139,7 +138,7 @@ Assembler::nFragExit(LInsp guard)
|
||||
#endif
|
||||
|
||||
// return value is GuardRecord*
|
||||
LDi(R2, int(lr));
|
||||
LDi(R0, int(lr));
|
||||
}
|
||||
|
||||
NIns*
|
||||
@ -150,7 +149,7 @@ Assembler::genEpilogue()
|
||||
// this is needed if we jump here from nFragExit
|
||||
//MR(R0,R2); // return LinkRecord*
|
||||
|
||||
RegisterMask savingMask = SavedRegs | rmask(FP) | rmask(LR);
|
||||
RegisterMask savingMask = rmask(FP) | rmask(LR);
|
||||
POP_mask(savingMask); // regs
|
||||
return _nIns;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user