mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 818138 - On x64 optimize push with small pointer immediates. r=jandem
This commit is contained in:
parent
4a5f707dbb
commit
252d483b90
@ -492,7 +492,7 @@ class MacroAssembler : public MacroAssemblerSpecific
|
||||
// Push VMFunction pointer, to mark arguments.
|
||||
Push(ImmWord(f));
|
||||
}
|
||||
void enterFakeExitFrame(void *codeVal = NULL) {
|
||||
void enterFakeExitFrame(IonCode *codeVal = NULL) {
|
||||
linkExitFrame();
|
||||
Push(ImmWord(uintptr_t(codeVal)));
|
||||
Push(ImmWord(uintptr_t(NULL)));
|
||||
|
@ -289,8 +289,14 @@ class Assembler : public AssemblerX86Shared
|
||||
push(ScratchReg);
|
||||
}
|
||||
void push(const ImmWord ptr) {
|
||||
movq(ptr, ScratchReg);
|
||||
push(ScratchReg);
|
||||
// We often end up with ImmWords that actually fit into int32.
|
||||
// Be aware of the sign extension behavior.
|
||||
if (ptr.value <= INT32_MAX) {
|
||||
push(Imm32(ptr.value));
|
||||
} else {
|
||||
movq(ptr, ScratchReg);
|
||||
push(ScratchReg);
|
||||
}
|
||||
}
|
||||
void push(const FloatRegister &src) {
|
||||
subq(Imm32(sizeof(void*)), StackPointer);
|
||||
|
Loading…
Reference in New Issue
Block a user