Closed Bug 581902 Opened 14 years ago Closed 12 years ago

JM: Eliminate Redundant Comparison in jsop_binary()

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
minor

Tracking

()

RESOLVED WONTFIX

People

(Reporter: sstangl, Unassigned)

References

Details

x = "cats" x+5 (breakpoint hit at top of jsop_binary at runtime): => 0x7ffff1d2b1fb: mov 0x90(%rbx),%r14 0x7ffff1d2b202: movabs $0xffff800000000000,%r11 0x7ffff1d2b20c: and %r11,%r14 0x7ffff1d2b20f: mov 0x90(%rbx),%r13 0x7ffff1d2b216: movabs $0x7fffffffffff,%r11 0x7ffff1d2b220: and %r11,%r13 0x7ffff1d2b223: mov %r13,%r12 0x7ffff1d2b226: movabs $0xfff8800000000000,%r11 0x7ffff1d2b230: cmp %r11,%r14 0x7ffff1d2b233: jne 0x7ffff1d2b2e5 Hits that, jumps to: => 0x7ffff1d2b2e5: movabs $0xfff8000000000000,%r11 0x7ffff1d2b2ef: cmp %r11,%r14 0x7ffff1d2b2f2: jae 0x7ffff1d2b372 The "movabs" and "cmp" have no effect and can be safely eliminated. On x86/ARM, this results in the elimination of a single 'cmp' per double/slow path. We need to first verify that ARM does not reset processor flags on a branch. (Though it would be very silly if that were the case.)
(In reply to comment #0) > We need to first verify that ARM does not reset processor flags on a branch. > (Though it would be very silly if that were the case.) This is fine on ARM. Branches don't touch flags.
JM was removed.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.