Closed Bug 597288 Opened 9 years ago Closed 9 years ago

alignment on call stack isn't 16byte on x86_64 CPU

Categories

(Core :: JavaScript Engine, defect)

x86_64
All
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: m_kato, Assigned: m_kato)

References

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

http://mxr.mozilla.org/mozilla-central/source/js/src/methodjit/Compiler.cpp?mark=1987-1999

1987 #if defined(JS_CPU_X86) || defined(JS_CPU_X64)
1988             /* Need to stay 16-byte aligned on x86/x64. */
1989             stubcc.masm.subPtr(Imm32(8), JSC::MacroAssembler::stackPointerRegister);
1990 #endif
1991             stubcc.masm.push(dataReg);
1992             stubcc.masm.push(t0);
1993             stubcc.masm.move(Imm32(argc), Registers::ArgReg1);
1994             stubcc.masm.wrapCall(pfun);
1995             stubcc.masm.pop(t0);
1996             stubcc.masm.pop(dataReg);
1997 #if defined(JS_CPU_X86) || defined(JS_CPU_X64)
1998             stubcc.masm.addPtr(Imm32(8), JSC::MacroAssembler::stackPointerRegister);
1999 #endif

On x64, 2 push reg is rsp-16, not rsp-8, so we don't need alignment adjust for x64.
Attached patch fixSplinter Review
Attachment #476205 - Flags: review?(dvander)
Attachment #476205 - Flags: review?(dvander) → review+
http://hg.mozilla.org/tracemonkey/rev/c3ccc3ba17ad
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/c3ccc3ba17ad
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Duplicate of this bug: 598247
You need to log in before you can comment on or make changes to this bug.