summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/offlineasm
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
commit2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch)
tree988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/JavaScriptCore/offlineasm
parentdd91e772430dc294e3bf478c119ef8d43c0a3358 (diff)
downloadqtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/JavaScriptCore/offlineasm')
-rw-r--r--Source/JavaScriptCore/offlineasm/armv7.rb46
-rw-r--r--Source/JavaScriptCore/offlineasm/instructions.rb14
-rw-r--r--Source/JavaScriptCore/offlineasm/x86.rb28
3 files changed, 63 insertions, 25 deletions
diff --git a/Source/JavaScriptCore/offlineasm/armv7.rb b/Source/JavaScriptCore/offlineasm/armv7.rb
index ed7db5618..69df51a45 100644
--- a/Source/JavaScriptCore/offlineasm/armv7.rb
+++ b/Source/JavaScriptCore/offlineasm/armv7.rb
@@ -70,7 +70,7 @@ class RegisterID
when "t3"
"r4"
when "t4"
- "r7"
+ "r10"
when "cfr"
"r5"
when "lr"
@@ -522,11 +522,11 @@ def armV7LowerMisplacedAddresses(list)
node.opcode,
armV7AsRegisters(newList, postInstructions, node.operands, "i"))
when "bbeq", "bbneq", "bba", "bbaeq", "bbb", "bbbeq", "btbo", "btbz", "btbnz", "tbz", "tbnz",
- "tbo"
+ "tbo", "cbeq", "cbneq", "cba", "cbaeq", "cbb", "cbbeq"
newList << Instruction.new(node.codeOrigin,
node.opcode,
armV7AsRegisters(newList, postInstructions, node.operands, "b"))
- when "bbgt", "bbgteq", "bblt", "bblteq", "btbs", "tbs"
+ when "bbgt", "bbgteq", "bblt", "bblteq", "btbs", "tbs", "cbgt", "cbgteq", "cblt", "cblteq"
newList << Instruction.new(node.codeOrigin,
node.opcode,
armV7AsRegisters(newList, postInstructions, node.operands, "bs"))
@@ -568,7 +568,8 @@ def armV7LowerRegisterReuse(list)
case node.opcode
when "cieq", "cineq", "cia", "ciaeq", "cib", "cibeq", "cigt", "cigteq", "cilt", "cilteq",
"cpeq", "cpneq", "cpa", "cpaeq", "cpb", "cpbeq", "cpgt", "cpgteq", "cplt", "cplteq",
- "tio", "tis", "tiz", "tinz", "tbo", "tbs", "tbz", "tbnz"
+ "tio", "tis", "tiz", "tinz", "tbo", "tbs", "tbz", "tbnz", "tpo", "tps", "tpz", "tpnz",
+ "cbeq", "cbneq", "cba", "cbaeq", "cbb", "cbbeq", "cbgt", "cbgteq", "cblt", "cblteq"
if node.operands.size == 2
if node.operands[0] == node.operands[1]
tmp = Tmp.new(node.codeOrigin, :gpr)
@@ -777,12 +778,7 @@ class Instruction
when "urshifti", "urshiftp"
emitArmV7Compact("lsrs", "lsrs", operands)
when "muli", "mulp"
- if operands.size == 2 or operands[0] == operands[2] or operands[1] == operands[2]
- emitArmV7("muls", operands)
- else
- $asm.puts "mov #{operands[2].armV7Operand}, #{operands[0].armV7Operand}"
- $asm.puts "muls #{operands[2].armV7Operand}, #{operands[2].armV7Operand}, #{operands[1].armV7Operand}"
- end
+ emitArmV7("mul", operands)
when "subi", "subp", "subis"
emitArmV7Compact("subs", "subs", operands)
when "negi", "negp"
@@ -950,36 +946,36 @@ class Instruction
$asm.puts "blx #{operands[0].armV7Operand}"
end
when "break"
- $asm.puts "bkpt"
+ $asm.puts "bkpt #0"
when "ret"
$asm.puts "bx lr"
- when "cieq", "cpeq"
+ when "cieq", "cpeq", "cbeq"
emitArmV7Compare(operands, "eq")
- when "cineq", "cpneq"
+ when "cineq", "cpneq", "cbneq"
emitArmV7Compare(operands, "ne")
- when "cia", "cpa"
+ when "cia", "cpa", "cba"
emitArmV7Compare(operands, "hi")
- when "ciaeq", "cpaeq"
+ when "ciaeq", "cpaeq", "cbaeq"
emitArmV7Compare(operands, "hs")
- when "cib", "cpb"
+ when "cib", "cpb", "cbb"
emitArmV7Compare(operands, "lo")
- when "cibeq", "cpbeq"
+ when "cibeq", "cpbeq", "cbbeq"
emitArmV7Compare(operands, "ls")
- when "cigt", "cpgt"
+ when "cigt", "cpgt", "cbgt"
emitArmV7Compare(operands, "gt")
- when "cigteq", "cpgteq"
+ when "cigteq", "cpgteq", "cbgteq"
emitArmV7Compare(operands, "ge")
- when "cilt", "cplt"
+ when "cilt", "cplt", "cblt"
emitArmV7Compare(operands, "lt")
- when "cilteq", "cplteq"
+ when "cilteq", "cplteq", "cblteq"
emitArmV7Compare(operands, "le")
- when "tio", "tbo"
+ when "tio", "tbo", "tpo"
emitArmV7TestSet(operands, "vs")
- when "tis", "tbs"
+ when "tis", "tbs", "tps"
emitArmV7TestSet(operands, "mi")
- when "tiz", "tbz"
+ when "tiz", "tbz", "tpz"
emitArmV7TestSet(operands, "eq")
- when "tinz", "tbnz"
+ when "tinz", "tbnz", "tpnz"
emitArmV7TestSet(operands, "ne")
when "peek"
$asm.puts "ldr #{operands[1].armV7Operand}, [sp, \##{operands[0].value * 4}]"
diff --git a/Source/JavaScriptCore/offlineasm/instructions.rb b/Source/JavaScriptCore/offlineasm/instructions.rb
index cc7e0c6a5..67cec6d96 100644
--- a/Source/JavaScriptCore/offlineasm/instructions.rb
+++ b/Source/JavaScriptCore/offlineasm/instructions.rb
@@ -133,6 +133,16 @@ MACRO_INSTRUCTIONS =
"break",
"call",
"ret",
+ "cbeq",
+ "cbneq",
+ "cba",
+ "cbaeq",
+ "cbb",
+ "cbbeq",
+ "cbgt",
+ "cbgteq",
+ "cblt",
+ "cblteq",
"cieq",
"cineq",
"cia",
@@ -151,6 +161,10 @@ MACRO_INSTRUCTIONS =
"tbs",
"tbz",
"tbnz",
+ "tpo",
+ "tps",
+ "tpz",
+ "tpnz",
"peek",
"poke",
"bpeq",
diff --git a/Source/JavaScriptCore/offlineasm/x86.rb b/Source/JavaScriptCore/offlineasm/x86.rb
index 4416ec909..e6a5c92ca 100644
--- a/Source/JavaScriptCore/offlineasm/x86.rb
+++ b/Source/JavaScriptCore/offlineasm/x86.rb
@@ -897,42 +897,62 @@ class Instruction
$asm.puts "ret"
when "cieq"
handleX86IntCompareSet("sete", :int)
+ when "cbeq"
+ handleX86IntCompareSet("sete", :byte)
when "cpeq"
handleX86IntCompareSet("sete", :ptr)
when "cineq"
handleX86IntCompareSet("setne", :int)
+ when "cbneq"
+ handleX86IntCompareSet("setne", :byte)
when "cpneq"
handleX86IntCompareSet("setne", :ptr)
when "cia"
handleX86IntCompareSet("seta", :int)
+ when "cba"
+ handleX86IntCompareSet("seta", :byte)
when "cpa"
handleX86IntCompareSet("seta", :ptr)
when "ciaeq"
handleX86IntCompareSet("setae", :int)
+ when "cbaeq"
+ handleX86IntCompareSet("setae", :byte)
when "cpaeq"
handleX86IntCompareSet("setae", :ptr)
when "cib"
handleX86IntCompareSet("setb", :int)
+ when "cbb"
+ handleX86IntCompareSet("setb", :byte)
when "cpb"
handleX86IntCompareSet("setb", :ptr)
when "cibeq"
handleX86IntCompareSet("setbe", :int)
+ when "cbbeq"
+ handleX86IntCompareSet("setbe", :byte)
when "cpbeq"
handleX86IntCompareSet("setbe", :ptr)
when "cigt"
handleX86IntCompareSet("setg", :int)
+ when "cbgt"
+ handleX86IntCompareSet("setg", :byte)
when "cpgt"
handleX86IntCompareSet("setg", :ptr)
when "cigteq"
handleX86IntCompareSet("setge", :int)
+ when "cbgteq"
+ handleX86IntCompareSet("setge", :byte)
when "cpgteq"
handleX86IntCompareSet("setge", :ptr)
when "cilt"
handleX86IntCompareSet("setl", :int)
+ when "cblt"
+ handleX86IntCompareSet("setl", :byte)
when "cplt"
handleX86IntCompareSet("setl", :ptr)
when "cilteq"
handleX86IntCompareSet("setle", :int)
+ when "cblteq"
+ handleX86IntCompareSet("setle", :byte)
when "cplteq"
handleX86IntCompareSet("setle", :ptr)
when "tio"
@@ -943,6 +963,14 @@ class Instruction
handleX86SetTest("setz", :int)
when "tinz"
handleX86SetTest("setnz", :int)
+ when "tpo"
+ handleX86SetTest("seto", :ptr)
+ when "tps"
+ handleX86SetTest("sets", :ptr)
+ when "tpz"
+ handleX86SetTest("setz", :ptr)
+ when "tpnz"
+ handleX86SetTest("setnz", :ptr)
when "tbo"
handleX86SetTest("seto", :byte)
when "tbs"