Assembler can create LIR_param instructions for callee-saved args

RESOLVED WONTFIX

Status

Core Graveyard
Nanojit
RESOLVED WONTFIX
8 years ago
4 years ago

People

(Reporter: Edwin Smith, Unassigned)

Tracking

unspecified
Future
Bug Flags:
flashplayer-qrb +

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
Doing this would eliminate that headache from the frontends, and slightly reduce the # of instructions that the LIR generation pipelines need to worry about.  The savedRegs[] array on LirBuffer can go away.

Rough sketch:
* in Assembler.beginAssembly(), create a small LirBuffer and LirBufWriter to hold just these parameter instructions.  (sized according to the Counts provided by the native backend).  also add a savedRegs[] field to Assembler, pointing to each of these parameter instructions.
* in gen(), when we visit LIR_ret, use assembler's savedRegs[] instead of LirBuffer's.
* in gen() when we're done iterating, meaning we're at the top of the generated function, iterate over the assembler-generated LIR_param's, calling asm_param for each like before.
* remove LirBuffer::savedRegs[] and all the code that sets it up.
(Reporter)

Updated

8 years ago
Component: JIT Compiler (NanoJIT) → Nanojit
Product: Tamarin → Core
QA Contact: nanojit → nanojit
Also, we wouldn't need to have two "kinds" (arg vs. saved) params, which are currently unintuitively represented with 0 and 1.  This removes a case from Nativei386.cpp:hint(), for one.`

Updated

8 years ago
Flags: flashplayer-qrb+
Target Milestone: --- → Future

Comment 2

8 years ago
I like it; we could even just point to the LirBuffer without the savedRegs[] array, since we only need to iterate over the buffer with a LirReader for each LIR_ret.
(Assignee)

Updated

4 years ago
Component: Nanojit → Nanojit
Product: Core → Core Graveyard
Nanojit has been dead for several years. Its Bugzilla component has been moved to the graveyard (bug 984276).

I checked all the open bugs. They're all uninteresting, so I'm WONTFIXing them all. Apologies for the bugspam.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.