Closed
Bug 1024515
Opened 12 years ago
Closed 12 years ago
IonMonkey MIPS: Test basic/testDivModWithIntMin.js fails on MIPS
Categories
(Core :: JavaScript Engine: JIT, defect)
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: rankov, Assigned: rankov)
Details
Attachments
(1 file)
|
9.09 KB,
patch
|
mjrosenb
:
review+
|
Details | Diff | Splinter Review |
Test basic/testDivModWithIntMin.js fails on MIPS with the message:
/scratch/work/github-gecko/gecko-dev/js/src/jit-test/tests/basic/testDivModWithIntMin.js:25:4 Error: Assertion failed: got 0, expected -1
It fails with following switches:
--ion-eager --ion-parallel-compile=off
--ion-eager --ion-parallel-compile=off --ion-check-range-analysis --no-sse3
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → branislav.rankov
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•12 years ago
|
||
There was a bug in ma_mod_mask. When mask is larger than 16 bits, ScratchRegister is clobbered. I fixed this by using a new register instead of scratch.
Attachment #8448103 -
Flags: review?(mrosenberg)
Comment 2•12 years ago
|
||
Comment on attachment 8448103 [details] [diff] [review]
mod-mask-i.patch
Review of attachment 8448103 [details] [diff] [review]:
-----------------------------------------------------------------
The code here looks fine. Two very optional considerations:
1) It looks like the code that you generate now is identical to the old code, but never uses the ScratchRegister as a temp variable. Theoretically, it is easier on the register allocator if you only take the extra scratch register when you know the mask will be over 1<<16. You can request the register allocator not give a register in that case, then at the top of ma_mod_mask, set remain = ScratchRegister
2) slightly different direction. if mask > (1>>16), you take a scratch register, and repeatedly set it to mask. You can instead assign it at the beginning of ma_mod_mask, then just use it without modifying it for the rest of the code generated for ma_mod_mask.
Attachment #8448103 -
Flags: review?(mrosenberg) → review+
| Assignee | ||
Comment 3•12 years ago
|
||
(In reply to Marty Rosenberg [:mjrosenb] from comment #2)
> Comment on attachment 8448103 [details] [diff] [review]
> mod-mask-i.patch
>
> Review of attachment 8448103 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> The code here looks fine. Two very optional considerations:
> 1) It looks like the code that you generate now is identical to the old
> code, but never uses the ScratchRegister as a temp variable. Theoretically,
> it is easier on the register allocator if you only take the extra scratch
> register when you know the mask will be over 1<<16. You can request the
> register allocator not give a register in that case, then at the top of
> ma_mod_mask, set remain = ScratchRegister
> 2) slightly different direction. if mask > (1>>16), you take a scratch
> register, and repeatedly set it to mask. You can instead assign it at the
> beginning of ma_mod_mask, then just use it without modifying it for the rest
> of the code generated for ma_mod_mask.
Thanks for the suggestions. I will leave it as it is for now. I will consider doing these improvements at a later time. I'm planing to reconsider if ma_mod_mask is worth using on MIPS since MIPS has div/mod instruction that might be faster than ma_mod_mask anyway.
| Assignee | ||
Comment 4•12 years ago
|
||
Here is the try link for the patch:
https://tbpl.mozilla.org/?tree=Try&rev=2767a212b2be
| Assignee | ||
Comment 5•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•