Title: [97072] trunk/Source/_javascript_Core
Revision
97072
Author
commit-qu...@webkit.org
Date
2011-10-10 11:45:31 -0700 (Mon, 10 Oct 2011)

Log Message

JSVALUE32_64 DFG JIT - Bug fix for BranchNull
https://bugs.webkit.org/show_bug.cgi?id=69743

Patch by Yuqiang Xian <yuqiang.x...@intel.com> on 2011-10-10
Reviewed by Darin Adler.

This fixes the error in access-binary-trees. All SunSpider cases passed.

* dfg/DFGJITCodeGenerator32_64.cpp:
(JSC::DFG::JITCodeGenerator::nonSpeculativePeepholeBranchNull):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (97071 => 97072)


--- trunk/Source/_javascript_Core/ChangeLog	2011-10-10 18:43:44 UTC (rev 97071)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-10-10 18:45:31 UTC (rev 97072)
@@ -1,3 +1,15 @@
+2011-10-10  Yuqiang Xian  <yuqiang.x...@intel.com>
+
+        JSVALUE32_64 DFG JIT - Bug fix for BranchNull
+        https://bugs.webkit.org/show_bug.cgi?id=69743
+
+        Reviewed by Darin Adler.
+
+        This fixes the error in access-binary-trees. All SunSpider cases passed.
+
+        * dfg/DFGJITCodeGenerator32_64.cpp:
+        (JSC::DFG::JITCodeGenerator::nonSpeculativePeepholeBranchNull):
+
 2011-10-07  Gavin Barraclough  <barraclo...@apple.com>
 
         DFG JIT: callOperation should return the Call.

Modified: trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator32_64.cpp (97071 => 97072)


--- trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator32_64.cpp	2011-10-10 18:43:44 UTC (rev 97071)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator32_64.cpp	2011-10-10 18:45:31 UTC (rev 97072)
@@ -1220,8 +1220,10 @@
         
         notCell.link(&m_jit);
         // null or undefined?
-        addBranch(m_jit.branch32(invert ? JITCompiler::NotEqual: JITCompiler::Equal, argTagGPR, JITCompiler::TrustedImm32(JSValue::NullTag)), taken);
-        addBranch(m_jit.branch32(invert ? JITCompiler::NotEqual: JITCompiler::Equal, argTagGPR, JITCompiler::TrustedImm32(JSValue::UndefinedTag)), taken);
+        COMPILE_ASSERT((JSValue::UndefinedTag | 1) == JSValue::NullTag, UndefinedTag_OR_1_EQUALS_NullTag);
+        m_jit.move(argTagGPR, resultGPR);
+        m_jit.or32(TrustedImm32(1), resultGPR);
+        addBranch(m_jit.branch32(invert ? JITCompiler::NotEqual : JITCompiler::Equal, resultGPR, JITCompiler::TrustedImm32(JSValue::NullTag)), taken);
     }
     
     if (notTaken != (m_block + 1))
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to