Closed Bug 1393732 Opened 7 years ago Closed 7 years ago

visitSignExtendInt64 on ARM is missing a move in the Word case

Categories

(Core :: JavaScript Engine: JIT, defect)

ARM
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: lth, Assigned: lth)

References

Details

Attachments

(1 file)

See https://bugzilla.mozilla.org/attachment.cgi?id=8901123 for the MIPS code, which is correct. For the 'Word' case, we need to move input.low to output.low unless they are equal, for the common sign extend to work correctly. Likely this passed tests because (a) the tests are too simplistic or (b) the register allocator fixed it by assigning input == output.
Fix a silly oversight in code generation: When extending 32-bit to 64-bit on a 32-bit system, the correct code moves the input to the low output register and then ASRs the low output into the high output. Here I'd forgotten the move. (I've checked x86 and x64 and they don't have this problem.)
Attachment #8901737 - Flags: review?(nicolas.b.pierron)
Comment on attachment 8901737 [details] [diff] [review] bug1393732-correct-sign-extend-codegen-ARM.patch Review of attachment 8901737 [details] [diff] [review]: ----------------------------------------------------------------- Good catch! Sounds like a copy&pasta issue from x86 code, without the register limitation of x86. We should backport that to all versions which have WASM enabled by default.
Attachment #8901737 - Flags: review?(nicolas.b.pierron) → review+
(In reply to Nicolas B. Pierron [:nbp] from comment #2) > > We should backport that to all versions which have WASM enabled by default. Good point. The code is brand new so I think it hasn't been merged to anywhere, except central, but I'll double-check that.
Only FF57 affected.
Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/0535c19bb610 Correct ARM codegen for 32-to-64 sign extend. r=nbp
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: