Closed Bug 998173 Opened 10 years ago Closed 10 years ago

Harmonize MacroAssemblerX64::finish and MacroAssemblerX86::finish

Categories

(Core :: JavaScript Engine: JIT, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: sunfish, Assigned: sunfish)

Details

Attachments

(1 file)

Currently, MacroAssemblerX86::finish uses an early return for the case where there are no constants to emit. This makes it inconvenient to use for other purposes. This differs from MacroAssemblerX64::finish which doesn't do this.
The attached patch harmonizes MacroAssemblerX64::finish and MacroAssemblerX86::finish, so that neither uses an early return, and to minimize unnecessary differences. And while here, it takes the opportunity to align float constants by 4 bytes instead of 8 when there are no double constants, which is mainly useful for not looking odd in spew output.
Assignee: nobody → sunfish
Attachment #8408734 - Flags: review?(benj)
Comment on attachment 8408734 [details] [diff] [review]
harmonize-x86-x64-finish.patch

Review of attachment 8408734 [details] [diff] [review]:
-----------------------------------------------------------------

Nice, i am wondering whether we could factorize it more in the shared x86 MacroAssembler by templatizing the Double / Float struct by a Label class, and then factor out the getDouble / getFloat functions.
Attachment #8408734 - Flags: review?(benj) → review+
https://hg.mozilla.org/mozilla-central/rev/898d176bfd22
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.