Closed Bug 869072 Opened 11 years ago Closed 11 years ago

Debug check in MacroAssembler-x64.h is ineffective

Categories

(Core :: JavaScript Engine, defect)

x86_64
All
defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: sunfish, Unassigned)

Details

Attachments

(1 file)

The debug check here:

http://hg.mozilla.org/mozilla-central/file/ee5ca214e87c/js/src/ion/x64/MacroAssembler-x64.h#l211

is checking for BelowOrEqual a 64-bit all-ones value, since the Imm32 creates a signed immediate value. This condition is always true.

I attempted to fix this by loading the immediate into the scratch register, but that seems to cause problems, so I don't have a suggestion of how to fix this.
|dest| can be used as a scratch register if |movq| is moved to after the #endif.
Attached patch a proposed fixSplinter Review
Thanks. The attached patch implements that, and fixes the bug.
Attachment #748966 - Flags: review?(sstangl)
Attachment #748966 - Flags: review?(sstangl) → review+
Whiteboard: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ffd8124e903c
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: