Closed Bug 513007 Opened 15 years ago Closed 15 years ago

asm_restore can rematerialize stack parameters instead of spilling them

Categories

(Tamarin Graveyard :: Baseline JIT (CodegenLIR), defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: edwsmith, Assigned: edwsmith)

References

Details

Attachments

(1 file)

Currently on i386, we use CDECL calling convention for jit-compiled AS3 methods, which puts all the parameters on the stack.  one parameter (env) is accessed frequently and tends to spill in most functions.

asm_restore() supports rematerializing various instructions (e.g. constants) instead of spilling them.  We could rematerializing incoming stack parameters since we can load them from their stack position relative to EBP, saving a few spills and a bit of stack space.

If we switched to FASTCALL for all calls then it would obviate the need for param-spilling in tamarin's use of nanojit (but this mod still wouldn't hurt)
Blocks: 511873
Assignee: nobody → edwsmith
Attachment #397390 - Flags: superreview?(rreitmai)
Attachment #397390 - Flags: review?(nnethercote)
Attachment #397390 - Flags: superreview?(rreitmai) → superreview+
Comment on attachment 397390 [details] [diff] [review]
rematerialize stack arguments instead of spilling

It would be helpful to document the computation of d.

Might also be time to introduce enums for paramKind() , if you don't object to extending the bounds of this patch.
Attachment #397390 - Flags: review?(nnethercote) → review+
will add better docs.  bug 513468 created for the enum.  (good idea).
pushed
http://hg.mozilla.org/tamarin-redux/rev/d138e8c6e0cf
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Resolved fixed engineering / work item that has been pushed.  Setting status to verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: