summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/offlineasm/instructions.rb
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/offlineasm/instructions.rb
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/JavaScriptCore/offlineasm/instructions.rb')
-rw-r--r--Source/JavaScriptCore/offlineasm/instructions.rb46
1 files changed, 20 insertions, 26 deletions
diff --git a/Source/JavaScriptCore/offlineasm/instructions.rb b/Source/JavaScriptCore/offlineasm/instructions.rb
index 5a3463fc9..bbfce7193 100644
--- a/Source/JavaScriptCore/offlineasm/instructions.rb
+++ b/Source/JavaScriptCore/offlineasm/instructions.rb
@@ -22,6 +22,7 @@
# THE POSSIBILITY OF SUCH DAMAGE.
require "config"
+require "set"
# Interesting invariant, which we take advantage of: branching instructions
# always begin with "b", and no non-branching instructions begin with "b".
@@ -29,6 +30,7 @@ require "config"
MACRO_INSTRUCTIONS =
[
+ "emit",
"addi",
"andi",
"lshifti",
@@ -247,8 +249,6 @@ MACRO_INSTRUCTIONS =
"bnz",
"leai",
"leap",
- "pushCalleeSaves",
- "popCalleeSaves",
"memfence"
]
@@ -258,10 +258,16 @@ X86_INSTRUCTIONS =
"idivi"
]
+ARM_INSTRUCTIONS =
+ [
+ "clrbp",
+ "mvlbl"
+ ]
+
ARM64_INSTRUCTIONS =
[
- "popLRAndFP", # ARM64 requires registers to be pushed and popped in pairs,
- "pushLRAndFP" # therefore we do LR (link register) and FP (frame pointer) together.
+ "pcrtoaddr", # Address from PC relative offset - adr instruction
+ "nopFixCortexA53Err835769" # nop on Cortex-A53 (nothing otherwise)
]
RISC_INSTRUCTIONS =
@@ -275,34 +281,22 @@ RISC_INSTRUCTIONS =
MIPS_INSTRUCTIONS =
[
+ "la",
"movz",
"movn",
+ "setcallreg",
"slt",
"sltu",
- "pichdr",
- "pichdrra"
- ]
-
-SH4_INSTRUCTIONS =
- [
- "shllx",
- "shlrx",
- "shld",
- "shad",
- "bdnan",
- "loaddReversedAndIncrementAddress",
- "storedReversedAndDecrementAddress",
- "ldspr",
- "stspr",
- "setargs"
+ "pichdr"
]
CXX_INSTRUCTIONS =
[
- "cloopCrash", # no operands
- "cloopCallJSFunction", # operands: callee
- "cloopCallNative", # operands: callee
- "cloopCallSlowPath", # operands: callTarget, currentFrame, currentPC
+ "cloopCrash", # no operands
+ "cloopCallJSFunction", # operands: callee
+ "cloopCallNative", # operands: callee
+ "cloopCallSlowPath", # operands: callTarget, currentFrame, currentPC
+ "cloopCallSlowPathVoid", # operands: callTarget, currentFrame, currentPC
# For debugging only:
# Takes no operands but simply emits whatever follows in // comments as
@@ -313,9 +307,9 @@ CXX_INSTRUCTIONS =
"cloopDo", # no operands
]
-INSTRUCTIONS = MACRO_INSTRUCTIONS + X86_INSTRUCTIONS + ARM64_INSTRUCTIONS + RISC_INSTRUCTIONS + MIPS_INSTRUCTIONS + SH4_INSTRUCTIONS + CXX_INSTRUCTIONS
+INSTRUCTIONS = MACRO_INSTRUCTIONS + X86_INSTRUCTIONS + ARM_INSTRUCTIONS + ARM64_INSTRUCTIONS + RISC_INSTRUCTIONS + MIPS_INSTRUCTIONS + CXX_INSTRUCTIONS
-INSTRUCTION_PATTERN = Regexp.new('\\A((' + INSTRUCTIONS.join(')|(') + '))\\Z')
+INSTRUCTION_SET = INSTRUCTIONS.to_set
def isBranch(instruction)
instruction =~ /^b/