Closed
Bug 513787
Opened 15 years ago
Closed 15 years ago
TM: Don't restore FP twice when exiting a fragment [nanojit]
Categories
(Core :: JavaScript Engine, defect, P2)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
People
(Reporter: gal, Assigned: gal)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file, 2 obsolete files)
13.47 KB,
patch
|
rreitmai
:
review+
|
Details | Diff | Splinter Review |
We currently jump to a fragment exit block when exiting trace, and then on to an epilogue. The epilogue is shared with fret/ret exits from trace. For the latter the epilogue fixes up SP for us. However, since fragment exits can be patched, they also have to fix up SP, even before hitting the epilogue. So we end up restoring SP twice (not destructive, but pointless). This patch restores SP always before jumping to the epilogue. Also, each fret/ret gets its own epilogue now. The epilogue is so short, its pointless to jump to it (2 bytes epilogue, 2 bytes to jump on i386). It only makes sense to share epilogues for side exits, since there we need the branch anyway so we can patch it later.
Assignee | ||
Comment 1•15 years ago
|
||
Assignee: general → gal
Assignee | ||
Comment 2•15 years ago
|
||
Attachment #397727 -
Attachment is obsolete: true
Assignee | ||
Updated•15 years ago
|
Summary: TM: Don't restore FP twice when exiting a fragment → TM: Don't restore FP twice when exiting a fragment [nanojit]
Assignee | ||
Comment 3•15 years ago
|
||
Attachment #397728 -
Attachment is obsolete: true
Attachment #397734 -
Flags: review?(florian)
Assignee | ||
Updated•15 years ago
|
Attachment #397734 -
Flags: review?(florian) → review?(rreitmai)
Comment 4•15 years ago
|
||
Bug 512839 is about a Valgrind error during TMFLAGS=assembly output that is directly relevant to this bug. The problem in that bug is that 'outputAddr' is initialised after genEpilogue() is called. With this patch, it looks like 'outputAddr' isn't initialised *at all*. Probably the best thing to do is initialise 'outputAddr' in Assembler::Assembler(). Andreas, can you add this? (Valgrinding with TMFLAGS=assembly to confirm my hypothesis would be helpful, too.) I'll mark this as blocking bug 512839, since this patch will likely end up fixing it.
Blocks: 512839
Updated•15 years ago
|
Attachment #397734 -
Flags: review?(rreitmai) → review+
Assignee | ||
Comment 5•15 years ago
|
||
Pushed along with fix for #4 (thanks nick). http://hg.mozilla.org/tracemonkey/rev/1e2673d4d208
Whiteboard: fixed-in-tracemonkey
Assignee | ||
Comment 6•15 years ago
|
||
Follow-up fix (missing empty function in ARM backend). http://hg.mozilla.org/tracemonkey/rev/e8a55ae8fb98
Comment 7•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/1e2673d4d208
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 8•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/e8a55ae8fb98
Comment 9•15 years ago
|
||
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/903bbf20d429
status1.9.2:
--- → beta1-fixed
Flags: blocking1.9.2+
Updated•15 years ago
|
Priority: -- → P2
You need to log in
before you can comment on or make changes to this bug.
Description
•