зеркало из https://github.com/mozilla/gecko-dev.git
Bug 818138 - On x64 optimize push with small pointer immediates. r=jandem
This commit is contained in:
Родитель
5716acb1df
Коммит
6c1b6b0d7a
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче