Bug 31151

Summary: Fix branchDouble behaviour on ARM THUMB2 JIT.
Product: WebKit Reporter: Gavin Barraclough <barraclough>
Component: JavaScriptCoreAssignee: Gavin Barraclough <barraclough>
Status: RESOLVED FIXED    
Severity: Normal CC: loki, zherczeg
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
The patch oliver: review+

Gavin Barraclough
Reported 2009-11-04 20:51:18 PST
The ARMv7 JIT is currently using ARMv7Assembler::ConditionEQ to branch for DoubleEqualOrUnordered, however this is incorrect – ConditionEQ won't branch on unordered operands. Similarly, DoubleLessThanOrUnordered & DoubleLessThanOrEqualOrUnordered use ARMv7Assembler::ConditionLO & ARMv7Assembler::ConditionLS, whereas they should be using ARMv7Assembler::ConditionLT & ARMv7Assembler::ConditionLE. As a consequence, the JIT may currently incorrectly branch on double comparisons to NaN, for example, "if (Number.NaN < 0) print("Oh noes it isn't!");" Fix these, and fill out the missing DoubleConditions.
Attachments
The patch (3.77 KB, patch)
2009-11-04 20:54 PST, Gavin Barraclough
oliver: review+
Gavin Barraclough
Comment 1 2009-11-04 20:54:13 PST
Created attachment 42541 [details] The patch
Gavin Barraclough
Comment 2 2009-11-04 21:02:22 PST
Sending JavaScriptCore/ChangeLog Sending JavaScriptCore/assembler/MacroAssemblerARMv7.h Transmitting file data .. Committed revision 50541.
Note You need to log in before you can comment on or make changes to this bug.