Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (146458 => 146459)
--- trunk/Source/_javascript_Core/ChangeLog 2013-03-21 13:14:32 UTC (rev 146458)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-03-21 13:19:40 UTC (rev 146459)
@@ -1,3 +1,19 @@
+2013-03-21 Gabor Rapcsanyi <rga...@webkit.org>
+
+ Implement LLInt for CPU(ARM_TRADITIONAL)
+ https://bugs.webkit.org/show_bug.cgi?id=97589
+
+ Reviewed by Zoltan Herczeg.
+
+ Enable LLInt for ARMv5 and ARMv7 traditional as well.
+
+ * llint/LLIntOfflineAsmConfig.h:
+ * llint/LowLevelInterpreter.asm:
+ * llint/LowLevelInterpreter32_64.asm:
+ * offlineasm/arm.rb:
+ * offlineasm/backends.rb:
+ * offlineasm/instructions.rb:
+
2013-03-20 Cosmin Truta <ctr...@blackberry.com>
[QNX][ARM] REGRESSION(r135330): Various failures in Octane
Modified: trunk/Source/_javascript_Core/llint/LLIntOfflineAsmConfig.h (146458 => 146459)
--- trunk/Source/_javascript_Core/llint/LLIntOfflineAsmConfig.h 2013-03-21 13:14:32 UTC (rev 146458)
+++ trunk/Source/_javascript_Core/llint/LLIntOfflineAsmConfig.h 2013-03-21 13:19:40 UTC (rev 146459)
@@ -62,6 +62,19 @@
#define OFFLINE_ASM_ARMv7 0
#endif
+#if CPU(ARM_TRADITIONAL)
+#if WTF_ARM_ARCH_AT_LEAST(7)
+#define OFFLINE_ASM_ARMv7_TRADITIONAL 1
+#define OFFLINE_ASM_ARM 0
+#else
+#define OFFLINE_ASM_ARM 1
+#define OFFLINE_ASM_ARMv7_TRADITIONAL 0
+#endif
+#else
+#define OFFLINE_ASM_ARMv7_TRADITIONAL 0
+#define OFFLINE_ASM_ARM 0
+#endif
+
#if CPU(X86_64)
#define OFFLINE_ASM_X86_64 1
#else
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm (146458 => 146459)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2013-03-21 13:14:32 UTC (rev 146458)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2013-03-21 13:19:40 UTC (rev 146459)
@@ -182,7 +182,7 @@
end
macro preserveReturnAddressAfterCall(destinationRegister)
- if C_LOOP or ARMv7 or MIPS
+ if C_LOOP or ARM or ARMv7 or ARMv7_TRADITIONAL or MIPS
# In C_LOOP case, we're only preserving the bytecode vPC.
move lr, destinationRegister
elsif X86 or X86_64
@@ -193,7 +193,7 @@
end
macro restoreReturnAddressBeforeReturn(sourceRegister)
- if C_LOOP or ARMv7 or MIPS
+ if C_LOOP or ARM or ARMv7 or ARMv7_TRADITIONAL or MIPS
# In C_LOOP case, we're only restoring the bytecode vPC.
move sourceRegister, lr
elsif X86 or X86_64
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm (146458 => 146459)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm 2013-03-21 13:14:32 UTC (rev 146458)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm 2013-03-21 13:19:40 UTC (rev 146459)
@@ -105,7 +105,7 @@
end
macro cCall2(function, arg1, arg2)
- if ARMv7
+ if ARM or ARMv7 or ARMv7_TRADITIONAL
move arg1, t0
move arg2, t1
call function
@@ -126,7 +126,7 @@
# This barely works. arg3 and arg4 should probably be immediates.
macro cCall4(function, arg1, arg2, arg3, arg4)
- if ARMv7
+ if ARM or ARMv7 or ARMv7_TRADITIONAL
move arg1, t0
move arg2, t1
move arg3, t2
@@ -1891,7 +1891,7 @@
call executableOffsetToFunction[t1]
addp 16 - 4, sp
loadp JITStackFrame::globalData + 4[sp], t3
- elsif ARMv7
+ elsif ARM or ARMv7 or ARMv7_TRADITIONAL
loadp JITStackFrame::globalData[sp], t3
storep cfr, JSGlobalData::topCallFrame[t3]
move t0, t2
Modified: trunk/Source/_javascript_Core/offlineasm/arm.rb (146458 => 146459)
--- trunk/Source/_javascript_Core/offlineasm/arm.rb 2013-03-21 13:14:32 UTC (rev 146458)
+++ trunk/Source/_javascript_Core/offlineasm/arm.rb 2013-03-21 13:19:40 UTC (rev 146459)
@@ -1,4 +1,5 @@
# Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
+# Copyright (C) 2013 University of Szeged. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -26,6 +27,28 @@
require "opt"
require "risc"
+def isARMv7
+ case $activeBackend
+ when "ARMv7"
+ true
+ when "ARMv7_TRADITIONAL", "ARM"
+ false
+ else
+ raise "bad value for $activeBackend: #{$activeBackend}"
+ end
+end
+
+def isARMv7Traditional
+ case $activeBackend
+ when "ARMv7_TRADITIONAL"
+ true
+ when "ARMv7", "ARM"
+ false
+ else
+ raise "bad value for $activeBackend: #{$activeBackend}"
+ end
+end
+
class Node
def armSingle
doubleOperand = armOperand
@@ -47,14 +70,16 @@
def armMoveImmediate(value, register)
# Currently we only handle the simple cases, and fall back to mov/movt for the complex ones.
if value >= 0 && value < 256
- $asm.puts "movw #{register.armOperand}, \##{value}"
+ $asm.puts "mov #{register.armOperand}, \##{value}"
elsif (~value) >= 0 && (~value) < 256
$asm.puts "mvn #{register.armOperand}, \##{~value}"
- else
+ elsif isARMv7 or isARMv7Traditional
$asm.puts "movw #{register.armOperand}, \##{value & 0xffff}"
if (value & 0xffff0000) != 0
$asm.puts "movt #{register.armOperand}, \##{(value >> 16) & 0xffff}"
end
+ else
+ $asm.puts "ldr #{register.armOperand}, =#{value}"
end
end
@@ -150,7 +175,7 @@
class BaseIndex
def armEmitLea(destination)
raise "Malformed BaseIndex, offset should be zero at #{codeOriginString}" unless offset.value == 0
- $asm.puts "add.w #{destination.armOperand}, #{base.armOperand}, #{index.armOperand}, lsl \##{scaleShift}"
+ $asm.puts "add #{destination.armOperand}, #{base.armOperand}, #{index.armOperand}, lsl \##{scaleShift}"
end
end
@@ -161,7 +186,22 @@
#
class Sequence
+ def getModifiedListARM
+ raise unless $activeBackend == "ARM"
+ getModifiedListARMCommon
+ end
+
def getModifiedListARMv7
+ raise unless $activeBackend == "ARMv7"
+ getModifiedListARMCommon
+ end
+
+ def getModifiedListARMv7_TRADITIONAL
+ raise unless $activeBackend == "ARMv7_TRADITIONAL"
+ getModifiedListARMCommon
+ end
+
+ def getModifiedListARMCommon
result = @list
result = riscLowerSimpleBranchOps(result)
result = riscLowerHardBranchOps(result)
@@ -237,8 +277,6 @@
if mask.immediate? and mask.value == -1
$asm.puts "tst #{value.armOperand}, #{value.armOperand}"
- elsif mask.immediate?
- $asm.puts "tst.w #{value.armOperand}, #{mask.armOperand}"
else
$asm.puts "tst #{value.armOperand}, #{mask.armOperand}"
end
@@ -259,7 +297,22 @@
end
class Instruction
+ def lowerARM
+ raise unless $activeBackend == "ARM"
+ lowerARMCommon
+ end
+
def lowerARMv7
+ raise unless $activeBackend == "ARMv7"
+ lowerARMCommon
+ end
+
+ def lowerARMv7_TRADITIONAL
+ raise unless $activeBackend == "ARMv7_TRADITIONAL"
+ lowerARMCommon
+ end
+
+ def lowerARMCommon
$asm.codeOrigin codeOriginString if $enableCodeOriginComments
$asm.annotation annotation if $enableInstrAnnotations
@@ -466,6 +519,9 @@
else
$asm.puts "mov pc, #{operands[0].armOperand}"
end
+ if not isARMv7 and not isARMv7Traditional
+ $asm.puts ".ltorg"
+ end
when "call"
if operands[0].label?
$asm.puts "blx #{operands[0].asmLabel}"
Modified: trunk/Source/_javascript_Core/offlineasm/backends.rb (146458 => 146459)
--- trunk/Source/_javascript_Core/offlineasm/backends.rb 2013-03-21 13:14:32 UTC (rev 146458)
+++ trunk/Source/_javascript_Core/offlineasm/backends.rb 2013-03-21 13:19:40 UTC (rev 146459)
@@ -32,7 +32,9 @@
[
"X86",
"X86_64",
+ "ARM",
"ARMv7",
+ "ARMv7_TRADITIONAL",
"MIPS",
"C_LOOP"
]
@@ -46,7 +48,9 @@
[
"X86",
"X86_64",
+ "ARM",
"ARMv7",
+ "ARMv7_TRADITIONAL",
"MIPS",
"C_LOOP"
]
Modified: trunk/Source/_javascript_Core/offlineasm/instructions.rb (146458 => 146459)
--- trunk/Source/_javascript_Core/offlineasm/instructions.rb 2013-03-21 13:14:32 UTC (rev 146458)
+++ trunk/Source/_javascript_Core/offlineasm/instructions.rb 2013-03-21 13:19:40 UTC (rev 146459)
@@ -257,7 +257,7 @@
"idivi"
]
-ARMv7_INSTRUCTIONS =
+ARM_INSTRUCTIONS =
[
"smulli",
"addis",
@@ -291,7 +291,7 @@
"cloopDo", # no operands
]
-INSTRUCTIONS = MACRO_INSTRUCTIONS + X86_INSTRUCTIONS + ARMv7_INSTRUCTIONS + MIPS_INSTRUCTIONS + CXX_INSTRUCTIONS
+INSTRUCTIONS = MACRO_INSTRUCTIONS + X86_INSTRUCTIONS + ARM_INSTRUCTIONS + MIPS_INSTRUCTIONS + CXX_INSTRUCTIONS
INSTRUCTION_PATTERN = Regexp.new('\\A((' + INSTRUCTIONS.join(')|(') + '))\\Z')
Modified: trunk/Source/WTF/ChangeLog (146458 => 146459)
--- trunk/Source/WTF/ChangeLog 2013-03-21 13:14:32 UTC (rev 146458)
+++ trunk/Source/WTF/ChangeLog 2013-03-21 13:19:40 UTC (rev 146459)
@@ -1,3 +1,14 @@
+2013-03-21 Gabor Rapcsanyi <rga...@webkit.org>
+
+ Implement LLInt for CPU(ARM_TRADITIONAL)
+ https://bugs.webkit.org/show_bug.cgi?id=97589
+
+ Reviewed by Zoltan Herczeg.
+
+ Enable LLInt for ARMv5 and ARMv7 traditional as well.
+
+ * wtf/Platform.h:
+
2013-03-20 Sheriff Bot <webkit.review....@gmail.com>
Unreviewed, rolling out r146419.
Modified: trunk/Source/WTF/wtf/Platform.h (146458 => 146459)
--- trunk/Source/WTF/wtf/Platform.h 2013-03-21 13:14:32 UTC (rev 146458)
+++ trunk/Source/WTF/wtf/Platform.h 2013-03-21 13:19:40 UTC (rev 146459)
@@ -785,7 +785,7 @@
&& ENABLE(JIT) \
&& (OS(DARWIN) || OS(LINUX)) \
&& (PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(GTK) || PLATFORM(QT)) \
- && (CPU(X86) || CPU(X86_64) || CPU(ARM_THUMB2) || CPU(MIPS))
+ && (CPU(X86) || CPU(X86_64) || CPU(ARM_THUMB2) || CPU(ARM_TRADITIONAL) || CPU(MIPS))
#define ENABLE_LLINT 1
#endif