Modified: trunk/Source/_javascript_Core/ChangeLog (159421 => 159422)
--- trunk/Source/_javascript_Core/ChangeLog 2013-11-18 15:28:47 UTC (rev 159421)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-11-18 16:01:17 UTC (rev 159422)
@@ -1,5 +1,17 @@
2013-11-18 Julien Brianceau <[email protected]>
+ Remove architecture specific code in LowLevelInterpreter.
+ https://bugs.webkit.org/show_bug.cgi?id=124501
+
+ Reviewed by Michael Saboff.
+
+ * llint/LowLevelInterpreter.asm: Use generic path instead of sh4 specific code.
+ * llint/LowLevelInterpreter32_64.asm: Merge sh4/mips path with arm path. The
+ "move t0, a0" is not needed for arm because t0 == a0 with this architecture.
+ * offlineasm/sh4.rb: Handle move opcode with pr register.
+
+2013-11-18 Julien Brianceau <[email protected]>
+
[arm] Add missing implementation in MacroAssembler to fix build (broken since r159395).
https://bugs.webkit.org/show_bug.cgi?id=124488
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm (159421 => 159422)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2013-11-18 15:28:47 UTC (rev 159421)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2013-11-18 16:01:17 UTC (rev 159422)
@@ -207,11 +207,9 @@
end
macro preserveReturnAddressAfterCall(destinationRegister)
- if C_LOOP or ARM or ARMv7 or ARMv7_TRADITIONAL or ARM64 or MIPS
+ if C_LOOP or ARM or ARMv7 or ARMv7_TRADITIONAL or ARM64 or MIPS or SH4
# In C_LOOP case, we're only preserving the bytecode vPC.
move lr, destinationRegister
- elsif SH4
- stspr destinationRegister
elsif X86 or X86_64
pop destinationRegister
else
@@ -220,11 +218,9 @@
end
macro restoreReturnAddressBeforeReturn(sourceRegister)
- if C_LOOP or ARM or ARMv7 or ARMv7_TRADITIONAL or ARM64 or MIPS
+ if C_LOOP or ARM or ARMv7 or ARMv7_TRADITIONAL or ARM64 or MIPS or SH4
# In C_LOOP case, we're only restoring the bytecode vPC.
move sourceRegister, lr
- elsif SH4
- ldspr sourceRegister
elsif X86 or X86_64
push sourceRegister
else
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm (159421 => 159422)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm 2013-11-18 15:28:47 UTC (rev 159421)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm 2013-11-18 16:01:17 UTC (rev 159422)
@@ -1910,7 +1910,7 @@
loadp ScopeChain[cfr], t3
andp MarkedBlockMask, t3
loadp MarkedBlock::m_weakSet + WeakSet::m_vm[t3], t3
- elsif ARM or ARMv7 or ARMv7_TRADITIONAL
+ elsif ARM or ARMv7 or ARMv7_TRADITIONAL or MIPS or SH4
loadp ScopeChain[cfr], t3
andp MarkedBlockMask, t3
loadp MarkedBlock::m_weakSet + WeakSet::m_vm[t3], t3
@@ -1922,29 +1922,14 @@
loadi Callee + PayloadOffset[cfr], t1
loadp JSFunction::m_executable[t1], t1
move t2, cfr
+ if MIPS or SH4
+ move t0, a0
+ end
call executableOffsetToFunction[t1]
restoreReturnAddressBeforeReturn(t3)
loadp ScopeChain[cfr], t3
andp MarkedBlockMask, t3
loadp MarkedBlock::m_weakSet + WeakSet::m_vm[t3], t3
- elsif MIPS or SH4
- loadp ScopeChain[cfr], t3
- andp MarkedBlockMask, t3
- loadp MarkedBlock::m_weakSet + WeakSet::m_vm[t3], t3
- storep cfr, VM::topCallFrame[t3]
- move t0, t2
- preserveReturnAddressAfterCall(t3)
- storep t3, ReturnPC[cfr]
- move cfr, t0
- loadi Callee + PayloadOffset[cfr], t1
- loadp JSFunction::m_executable[t1], t1
- move t2, cfr
- move t0, a0
- call executableOffsetToFunction[t1]
- restoreReturnAddressBeforeReturn(t3)
- loadp ScopeChain[cfr], t3
- andp MarkedBlockMask, t3
- loadp MarkedBlock::m_weakSet + WeakSet::m_vm[t3], t3
elsif C_LOOP
loadp ScopeChain[cfr], t3
andp MarkedBlockMask, t3
Modified: trunk/Source/_javascript_Core/offlineasm/sh4.rb (159421 => 159422)
--- trunk/Source/_javascript_Core/offlineasm/sh4.rb 2013-11-18 15:28:47 UTC (rev 159421)
+++ trunk/Source/_javascript_Core/offlineasm/sh4.rb 2013-11-18 16:01:17 UTC (rev 159422)
@@ -489,6 +489,14 @@
| node |
if node.is_a? Instruction
case node.opcode
+ when "move"
+ if node.operands[0].is_a? RegisterID and node.operands[0].sh4Operand == "pr"
+ newList << Instruction.new(codeOrigin, "stspr", [node.operands[1]])
+ elsif node.operands[1].is_a? RegisterID and node.operands[1].sh4Operand == "pr"
+ newList << Instruction.new(codeOrigin, "ldspr", [node.operands[0]])
+ else
+ newList << node
+ end
when "loadi", "loadis", "loadp"
if node.operands[1].is_a? RegisterID and node.operands[1].sh4Operand == "pr"
tmp = Tmp.new(codeOrigin, :gpr)