Closed Bug 560106 Opened 11 years ago Closed 11 years ago
Add missing 64-bit algebraic optimizations to Expr
Several 32-bit optimizations in ExprFilter are missing their 64-bit couterparts: * constant folding * algebraic simplifications for op(x, imm64)
Assignee: nobody → edwsmith
Status: NEW → ASSIGNED
Handle more cases. Now each 32-bit optimization in ExprFilter::ins2() should have a 64-bit counterpart.
Comment on attachment 446973 [details] [diff] [review] constant folding for LIR_i2q and ui2uq immI() already returns int32_t but a bit overcasting for clarity can't hurt and it matches the uint case where its needed.
Attachment #446973 - Flags: review?(gal) → review+
yup, i'm counting on sign extension, thats why I overcasted for clarity.
Comment on attachment 446973 [details] [diff] [review] constant folding for LIR_i2q and ui2uq NJ: i2q constant folding http://hg.mozilla.org/projects/nanojit-central/rev/e6ce59a07d5f
Comment on attachment 446880 [details] [diff] [review] (v3) Adds ALU op constant folding and algebraic simplifications On line 619, insImmI(0) is returned in all cases. Should be insImmQ(0) for LIR_xorq. R+ with the above fix. nits: I would prefer redundant explicit casts on unsigned shift arguments in the 64-bit case similar to those on signed arguments in the 32-bit case. The fact that immI() returns int32_t and immQ() returns uint64_t is confusing. Also, inside an #ifdef NANOJIT_64BIT, InsImmWord can be replaced with InsImmQ.
Attachment #446880 - Flags: review?(wmaddox) → review+
I'll update this once Bug 527512 lands, since it cleans up code. I could also wait for bug 569753 (splitting up ExprFilter::ins2) to avoid making the problem worse before it gets better. opinions?
Whiteboard: PACMAN → PACMAN, fixed-in-nanojit, fixed-in-tracemonkey
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: PACMAN, fixed-in-nanojit, fixed-in-tracemonkey → PACMAN, fixed-in-nanojit, fixed-in-tracemonkey, fixed-in-tamarin
You need to log in before you can comment on or make changes to this bug.