mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 868027 - Use push to push integer registers onto the stack on x64. r=nbp
Use push instead of adjusting the stack pointer and doing stores manually. This significantly reduces code size for these sequences.
This commit is contained in:
parent
42ad8d0952
commit
a539075045
@ -282,9 +282,10 @@ IonRuntime::generateInvalidator(JSContext *cx)
|
||||
masm.addq(Imm32(sizeof(uintptr_t)), rsp);
|
||||
|
||||
// Push registers such that we can access them from [base + code].
|
||||
masm.reserveStack(Registers::Total * sizeof(void *));
|
||||
for (uint32_t i = 0; i < Registers::Total; i++)
|
||||
masm.movq(Register::FromCode(i), Operand(rsp, i * sizeof(void *)));
|
||||
for (uint32_t i = Registers::Total; i > 0; ) {
|
||||
i--;
|
||||
masm.Push(Register::FromCode(i));
|
||||
}
|
||||
|
||||
// Push xmm registers, such that we can access them from [base + code].
|
||||
masm.reserveStack(FloatRegisters::Total * sizeof(double));
|
||||
@ -415,9 +416,10 @@ static void
|
||||
GenerateBailoutThunk(JSContext *cx, MacroAssembler &masm, uint32_t frameClass)
|
||||
{
|
||||
// Push registers such that we can access them from [base + code].
|
||||
masm.reserveStack(Registers::Total * sizeof(void *));
|
||||
for (uint32_t i = 0; i < Registers::Total; i++)
|
||||
masm.movq(Register::FromCode(i), Operand(rsp, i * sizeof(void *)));
|
||||
for (uint32_t i = Registers::Total; i > 0; ) {
|
||||
i--;
|
||||
masm.Push(Register::FromCode(i));
|
||||
}
|
||||
|
||||
// Push xmm registers, such that we can access them from [base + code].
|
||||
masm.reserveStack(FloatRegisters::Total * sizeof(double));
|
||||
|
Loading…
Reference in New Issue
Block a user