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)

Other
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: rankov, Assigned: rankov)

Details

Attachments

(1 file)

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: nobody → branislav.rankov
Status: NEW → ASSIGNED
Attached patch mod-mask-i.patch — — Splinter Review
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 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+
(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.
Here is the try link for the patch: https://tbpl.mozilla.org/?tree=Try&rev=2767a212b2be
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.

Attachment

General

Created:
Updated:
Size: