Title: [148045] trunk/Source/_javascript_Core
Revision
148045
Author
[email protected]
Date
2013-04-09 13:42:19 -0700 (Tue, 09 Apr 2013)

Log Message

LLInt conditional branch compilation fault on MIPS.
https://bugs.webkit.org/show_bug.cgi?id=114264

Patch by Balazs Kilvady <[email protected]> on 2013-04-09
Reviewed by Filip Pizlo.

Fix conditional branch compilation in LLInt offlineasm.

* offlineasm/mips.rb:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (148044 => 148045)


--- trunk/Source/_javascript_Core/ChangeLog	2013-04-09 20:35:52 UTC (rev 148044)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-04-09 20:42:19 UTC (rev 148045)
@@ -1,3 +1,14 @@
+2013-04-09  Balazs Kilvady  <[email protected]>
+
+        LLInt conditional branch compilation fault on MIPS.
+        https://bugs.webkit.org/show_bug.cgi?id=114264
+
+        Reviewed by Filip Pizlo.
+
+        Fix conditional branch compilation in LLInt offlineasm.
+
+        * offlineasm/mips.rb:
+
 2013-04-08  Mark Hahnenberg  <[email protected]>
 
         JSObject::getOwnNonIndexPropertyNames calculates numCacheableSlots incorrectly

Modified: trunk/Source/_javascript_Core/offlineasm/mips.rb (148044 => 148045)


--- trunk/Source/_javascript_Core/offlineasm/mips.rb	2013-04-09 20:35:52 UTC (rev 148044)
+++ trunk/Source/_javascript_Core/offlineasm/mips.rb	2013-04-09 20:42:19 UTC (rev 148045)
@@ -290,14 +290,8 @@
                 comp = node.opcode[1] == ?b ? "sltub" : "sltu"
                 newList << Instruction.new(node.codeOrigin, comp, [tmp, node.operands[1], node.operands[0]], annotation)
                 newList << Instruction.new(node.codeOrigin, "bz", [tmp, MIPS_ZERO_REG, node.operands[2]])
-            when "btiz", "btpz", "btbz"
-                lowerMIPSCondBranch(newList, "bz", node)
-            when "btinz", "btpnz", "btbnz"
-                lowerMIPSCondBranch(newList, "bnz", node)
-            when "btio", "btpo", "btbo"
-                newList << node
-            when "btis", "btps", "btbs"
-                lowerMIPSCondBranch(newList, "bs", node)
+            when /^bt(i|p|b)/
+                lowerMIPSCondBranch(newList, "b" + $~.post_match + $1, node)
             else
                 newList << node
             end
@@ -442,10 +436,11 @@
                 newList << Instruction.new(node.codeOrigin,
                                            node.opcode,
                                            riscAsRegisters(newList, [], node.operands, "b"))
-            when "bz", "bnz", "bs", "bo"
+            when /^(bz|bnz|bs|bo)/
+                tl = $~.post_match == "" ? "i" : $~.post_match
                 newList << Instruction.new(node.codeOrigin,
                                            node.opcode,
-                                           riscAsRegisters(newList, [], node.operands, "i"))
+                                           riscAsRegisters(newList, [], node.operands, tl))
             else
                 newList << node
             end
@@ -861,13 +856,13 @@
         when "fd2ii"
             $asm.puts "mfc1 #{operands[1].mipsOperand}, #{operands[0].mipsSingleLo}"
             $asm.puts "mfc1 #{operands[2].mipsOperand}, #{operands[0].mipsSingleHi}"
-        when "bo"
+        when /^bo/
             $asm.puts "bgt #{operands[0].mipsOperand}, #{operands[1].mipsOperand}, #{operands[2].asmLabel}"
-        when "bs"
+        when /^bs/
             $asm.puts "blt #{operands[0].mipsOperand}, #{operands[1].mipsOperand}, #{operands[2].asmLabel}"
-        when "bz"
+        when /^bz/
             $asm.puts "beq #{operands[0].mipsOperand}, #{operands[1].mipsOperand}, #{operands[2].asmLabel}"
-        when "bnz"
+        when /^bnz/
             $asm.puts "bne #{operands[0].mipsOperand}, #{operands[1].mipsOperand}, #{operands[2].asmLabel}"
         when "leai", "leap"
             operands[0].mipsEmitLea(operands[1])
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to