Closed Bug 1381438 Opened 7 years ago Closed 7 years ago

boxDouble should not clobber the source register

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox-esr52 --- unaffected
firefox54 --- wontfix
firefox55 - fixed
firefox56 - fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
On x86 without SSE 4.1, boxDouble can clobber the source double register. This is surprising and breaks some CacheIR code. evilpie's patch for bug 1344483 triggers a jit-test failure.

This patch makes this more explicit by adding an additional temp argument to boxDouble. Most callers can pass the same register as the source register, but callers that want to preserve the source can pass a different register.
Attachment #8887000 - Flags: review?(evilpies)
We should probably backport this to 55. Fortunately this only affects pretty old CPUs (x86 without SSE 4.1).
Comment on attachment 8887000 [details] [diff] [review]
Patch

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

Nice, thanks for looking into this, I would probably not have found this.
Attachment #8887000 - Flags: review?(evilpies) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e73020a1e023
Fix boxDouble to not clobber the source register on x86 CPUs without SSE 4.1. r=evilpie
https://hg.mozilla.org/mozilla-central/rev/e73020a1e023
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Please request Beta approval on this when you're comfortable doing so.
Flags: needinfo?(jdemooij)
Comment on attachment 8887000 [details] [diff] [review]
Patch

Approval Request Comment
[Feature/Bug causing the regression]: Bug 1341067.
[User impact if declined]: Broken websites for users with old CPUs.
[Is this code covered by automated tests?]: Yes.
[Has the fix been verified in Nightly?]: Yes.
[Needs manual test from QE? If yes, steps to reproduce]: No.
[List of other uplifts needed for the feature/fix]: None.
[Is the change risky?]: No.
[Why is the change risky/not risky?]: Patch is mechanical for the most part, only changes behavior for users on 32-bit x86 CPUs that don't support SSE 4.1  
[String changes made/needed]: None.
Flags: needinfo?(jdemooij)
Attachment #8887000 - Flags: approval-mozilla-beta?
Comment on attachment 8887000 [details] [diff] [review]
Patch

jit fix for some x86 cpus, beta55+
Attachment #8887000 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: