Title: [164494] trunk/Source/_javascript_Core
Revision
164494
Author
[email protected]
Date
2014-02-21 13:26:53 -0800 (Fri, 21 Feb 2014)

Log Message

[Win][LLINT] Many JSC stress test failures.
https://bugs.webkit.org/show_bug.cgi?id=129155

Patch by [email protected] <[email protected]> on 2014-02-21
Reviewed by Michael Saboff.

Intel syntax has reversed operand order compared to AT&T syntax, so we need to swap the operand order, in this case on floating point operations.
Also avoid using the reverse opcode (e.g. fdivr), as this puts the result at the wrong position in the floating point stack.
E.g. "divd ft0, ft1" would translate to fdivr st, st(1) (Intel syntax) on Windows, but this puts the result in st, when it should be in st(1).

* offlineasm/x86.rb: Swap operand order on Windows.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (164493 => 164494)


--- trunk/Source/_javascript_Core/ChangeLog	2014-02-21 20:37:19 UTC (rev 164493)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-02-21 21:26:53 UTC (rev 164494)
@@ -1,3 +1,16 @@
+2014-02-21  [email protected]  <[email protected]>
+
+        [Win][LLINT] Many JSC stress test failures.
+        https://bugs.webkit.org/show_bug.cgi?id=129155
+
+        Reviewed by Michael Saboff.
+
+        Intel syntax has reversed operand order compared to AT&T syntax, so we need to swap the operand order, in this case on floating point operations.
+        Also avoid using the reverse opcode (e.g. fdivr), as this puts the result at the wrong position in the floating point stack.
+        E.g. "divd ft0, ft1" would translate to fdivr st, st(1) (Intel syntax) on Windows, but this puts the result in st, when it should be in st(1).
+
+        * offlineasm/x86.rb: Swap operand order on Windows.
+
 2014-02-21  Filip Pizlo  <[email protected]>
 
         DFG write barriers should do more speculations

Modified: trunk/Source/_javascript_Core/offlineasm/x86.rb (164493 => 164494)


--- trunk/Source/_javascript_Core/offlineasm/x86.rb	2014-02-21 20:37:19 UTC (rev 164493)
+++ trunk/Source/_javascript_Core/offlineasm/x86.rb	2014-02-21 21:26:53 UTC (rev 164494)
@@ -806,12 +806,12 @@
 
     def handleX87BinOp(opcode, opcodereverse)
         if (operands[1].x87DefaultStackPosition == 0)
-            $asm.puts "#{opcode} #{operands[0].x87Operand(0)}, #{register("st")}"
+            $asm.puts "#{opcode} #{orderOperands(operands[0].x87Operand(0), register("st"))}"
         elsif (operands[0].x87DefaultStackPosition == 0)
-            $asm.puts "#{opcodereverse} #{register("st")}, #{operands[1].x87Operand(0)}"
+            $asm.puts "#{opcode} #{orderOperands(register("st"), operands[1].x87Operand(0))}"
         else
             $asm.puts "fld #{operands[0].x87Operand(0)}"
-            $asm.puts "#{opcodereverse}p #{register("st")}, #{operands[1].x87Operand(1)}"
+            $asm.puts "#{opcodereverse}p #{orderOperands(register("st"), operands[1].x87Operand(1))}"
         end
     end
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to