IonMonkey: MIPS64: Fix range checking in ma_addTestOverflow

RESOLVED FIXED in Firefox 53

Status

()

Core
JavaScript Engine: JIT
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: hev, Assigned: hev)

Tracking

unspecified
mozilla53
Other
Linux
Points:
---

Firefox Tracking Flags

(firefox53 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

a year ago
Don't check for unsigned range because of as_xori removed.
(Assignee)

Comment 1

a year ago
Created attachment 8818822 [details] [diff] [review]
0001-IonMonkey-MIPS64-Fix-range-checking-in-ma_addTestOve.patch
Attachment #8818822 - Flags: review?(arai.unmht)
can you provide some more context?
what do you mean by "as_xori removed" ?
(Assignee)

Comment 3

a year ago
(In reply to Tooru Fujisawa [:arai] from comment #2)
> can you provide some more context?
> what do you mean by "as_xori removed" ?

In old implementation, xori instruction is used for checking overflow. But, on mips64, xori was removed.

https://dxr.mozilla.org/mozilla-central/source/js/src/jit/mips32/MacroAssembler-mips32.cpp#260

Format:
ADDIU rt, rs, immediate
Purpose: Add Immediate Unsigned Word
To add a constant to a 32-bit integer
Description: GPR[rt] ← GPR[rs] + immediate
The 16-bit ***signed*** immediate is added to the 32-bit value in GPR rs and the 32-bit arithmetic result is sign-extended
and placed into GPR rt.

Format:
XORI rt, rs, immediate
Purpose: Exclusive OR Immediate
To do a bitwise logical Exclusive OR with a constant
Description: GPR[rt] ← GPR[rs] XOR immediate
Combine the contents of GPR rs and the 16-bit ***zero-extended*** immediate in a bitwise logical Exclusive OR operation
and place the result into GPR rt.
Comment on attachment 8818822 [details] [diff] [review]
0001-IonMonkey-MIPS64-Fix-range-checking-in-ma_addTestOve.patch

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

thank you for detailed explanation :)
Attachment #8818822 - Flags: review?(arai.unmht) → review+

Comment 5

a year ago
Pushed by r@hev.cc:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f497d59d065c
IonMonkey: MIPS64: Fix range checking in ma_addTestOverflow. r=arai

Comment 6

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/f497d59d065c
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
status-firefox53: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.