Changeset 164494 in webkit


Ignore:
Timestamp:
Feb 21, 2014 1:26:53 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by peavo@outlook.com <peavo@outlook.com> 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.
Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r164493 r164494  
     12014-02-21  peavo@outlook.com  <peavo@outlook.com>
     2
     3        [Win][LLINT] Many JSC stress test failures.
     4        https://bugs.webkit.org/show_bug.cgi?id=129155
     5
     6        Reviewed by Michael Saboff.
     7
     8        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.
     9        Also avoid using the reverse opcode (e.g. fdivr), as this puts the result at the wrong position in the floating point stack.
     10        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).
     11
     12        * offlineasm/x86.rb: Swap operand order on Windows.
     13
    1142014-02-21  Filip Pizlo  <fpizlo@apple.com>
    215
  • trunk/Source/JavaScriptCore/offlineasm/x86.rb

    r164374 r164494  
    807807    def handleX87BinOp(opcode, opcodereverse)
    808808        if (operands[1].x87DefaultStackPosition == 0)
    809             $asm.puts "#{opcode} #{operands[0].x87Operand(0)}, #{register("st")}"
     809            $asm.puts "#{opcode} #{orderOperands(operands[0].x87Operand(0), register("st"))}"
    810810        elsif (operands[0].x87DefaultStackPosition == 0)
    811             $asm.puts "#{opcodereverse} #{register("st")}, #{operands[1].x87Operand(0)}"
     811            $asm.puts "#{opcode} #{orderOperands(register("st"), operands[1].x87Operand(0))}"
    812812        else
    813813            $asm.puts "fld #{operands[0].x87Operand(0)}"
    814             $asm.puts "#{opcodereverse}p #{register("st")}, #{operands[1].x87Operand(1)}"
     814            $asm.puts "#{opcodereverse}p #{orderOperands(register("st"), operands[1].x87Operand(1))}"
    815815        end
    816816    end
Note: See TracChangeset for help on using the changeset viewer.