# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
+require "config"
+
# Interesting invariant, which we take advantage of: branching instructions
# always begin with "b", and no non-branching instructions begin with "b".
# Terminal instructions are "jmp" and "ret".
"andi",
"lshifti",
"lshiftp",
+ "lshiftq",
"muli",
"negi",
"negp",
+ "negq",
"noti",
"ori",
"rshifti",
"urshifti",
"rshiftp",
"urshiftp",
+ "rshiftq",
+ "urshiftq",
"subi",
"xori",
"loadi",
"ci2d",
"fii2d", # usage: fii2d <gpr with least significant bits>, <gpr with most significant bits>, <fpr>
"fd2ii", # usage: fd2ii <fpr>, <gpr with least significant bits>, <gpr with most significant bits>
- "fp2d",
- "fd2p",
+ "fq2d",
+ "fd2q",
"bdeq",
"bdneq",
"bdgt",
"pop",
"push",
"move",
- "sxi2p",
- "zxi2p",
+ "sxi2q",
+ "zxi2q",
"nop",
"bieq",
"bineq",
"bbgteq",
"bblt",
"bblteq",
- "btio",
"btis",
"btiz",
"btinz",
- "btbo",
"btbs",
"btbz",
"btbnz",
"cigteq",
"cilt",
"cilteq",
- "tio",
"tis",
"tiz",
"tinz",
- "tbo",
"tbs",
"tbz",
"tbnz",
- "tpo",
"tps",
"tpz",
"tpnz",
"cplt",
"cplteq",
"storep",
- "btpo",
"btps",
"btpz",
"btpnz",
"baddps",
"baddpz",
"baddpnz",
+ "tqs",
+ "tqz",
+ "tqnz",
+ "peekq",
+ "pokeq",
+ "bqeq",
+ "bqneq",
+ "bqa",
+ "bqaeq",
+ "bqb",
+ "bqbeq",
+ "bqgt",
+ "bqgteq",
+ "bqlt",
+ "bqlteq",
+ "addq",
+ "mulq",
+ "andq",
+ "orq",
+ "subq",
+ "xorq",
+ "loadq",
+ "cqeq",
+ "cqneq",
+ "cqa",
+ "cqaeq",
+ "cqb",
+ "cqbeq",
+ "cqgt",
+ "cqgteq",
+ "cqlt",
+ "cqlteq",
+ "storeq",
+ "btqs",
+ "btqz",
+ "btqnz",
+ "baddqo",
+ "baddqs",
+ "baddqz",
+ "baddqnz",
"bo",
"bs",
"bz",
X86_INSTRUCTIONS =
[
"cdqi",
- "idivi"
+ "idivi",
+ "resetX87Stack"
+ ]
+
+RISC_INSTRUCTIONS =
+ [
+ "smulli", # Multiply two 32-bit words and produce a 64-bit word
+ "addis", # Add integers and set a flag.
+ "subis", # Same, but for subtraction.
+ "oris", # Same, but for bitwise or.
+ "addps" # addis but for pointers.
]
-ARMv7_INSTRUCTIONS =
+MIPS_INSTRUCTIONS =
[
- "smulli",
- "addis",
- "subis",
- "oris"
+ "movz",
+ "movn",
+ "slt",
+ "sltu",
+ "pichdr",
+ "pichdrra"
+ ]
+
+SH4_INSTRUCTIONS =
+ [
+ "shllx",
+ "shlrx",
+ "shld",
+ "shad",
+ "bdnan",
+ "loaddReversedAndIncrementAddress",
+ "storedReversedAndDecrementAddress",
+ "ldspr",
+ "stspr",
+ "callf",
+ "jmpf"
+ ]
+
+CXX_INSTRUCTIONS =
+ [
+ "cloopCrash", # no operands
+ "cloopCallJSFunction", # operands: callee
+ "cloopCallNative", # operands: callee
+ "cloopCallSlowPath", # operands: callTarget, currentFrame, currentPC
+
+ # For debugging only:
+ # Takes no operands but simply emits whatever follows in // comments as
+ # a line of C++ code in the generated LLIntAssembly.h file. This can be
+ # used to insert instrumentation into the interpreter loop to inspect
+ # variables of interest. Do not leave these instructions in production
+ # code.
+ "cloopDo", # no operands
]
-INSTRUCTIONS = MACRO_INSTRUCTIONS + X86_INSTRUCTIONS + ARMv7_INSTRUCTIONS
+INSTRUCTIONS = MACRO_INSTRUCTIONS + X86_INSTRUCTIONS + RISC_INSTRUCTIONS + MIPS_INSTRUCTIONS + SH4_INSTRUCTIONS + CXX_INSTRUCTIONS
INSTRUCTION_PATTERN = Regexp.new('\\A((' + INSTRUCTIONS.join(')|(') + '))\\Z')