Stop using eax as scratch when making calls

RESOLVED FIXED in Firefox 50

Status

()

Core
JavaScript Engine: JIT
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

unspecified
mozilla50
Points:
---

Firefox Tracking Flags

(firefox50 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
Created attachment 8766227 [details] [diff] [review]
Patch

When we make a VM call, we emit something like this:

27CA2564  mov         eax,185D670h
27CA2569  call        eax 

It's silly because we can easily emit a direct call. Note that the call(ImmWord) and call(ImmPtr) methods I added to AssemblerX64 are similar to the ones already in AssemblerX86.

Thanks to Jason for noticing this.
Attachment #8766227 - Flags: review?(nicolas.b.pierron)
Comment on attachment 8766227 [details] [diff] [review]
Patch

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

I cannot find any legitimate reason why we have not done so before.
Attachment #8766227 - Flags: review?(nicolas.b.pierron) → review+

Comment 2

2 years ago
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6de4b5024668
Emit direct calls to VM functions instead of using a scratch register. r=nbp

Comment 3

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/6de4b5024668
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox50: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.