1 // Copyright 2014 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef V8_COMPILER_ARM_INSTRUCTION_CODES_ARM_H_ 6 #define V8_COMPILER_ARM_INSTRUCTION_CODES_ARM_H_ 7 8 namespace v8 { 9 namespace internal { 10 namespace compiler { 11 12 // ARM-specific opcodes that specify which assembly sequence to emit. 13 // Most opcodes specify a single instruction. 14 #define TARGET_ARCH_OPCODE_LIST(V) \ 15 V(ArmAdd) \ 16 V(ArmAnd) \ 17 V(ArmBic) \ 18 V(ArmClz) \ 19 V(ArmCmp) \ 20 V(ArmCmn) \ 21 V(ArmTst) \ 22 V(ArmTeq) \ 23 V(ArmOrr) \ 24 V(ArmEor) \ 25 V(ArmSub) \ 26 V(ArmRsb) \ 27 V(ArmMul) \ 28 V(ArmMla) \ 29 V(ArmMls) \ 30 V(ArmSmmul) \ 31 V(ArmSmmla) \ 32 V(ArmUmull) \ 33 V(ArmSdiv) \ 34 V(ArmUdiv) \ 35 V(ArmMov) \ 36 V(ArmMvn) \ 37 V(ArmBfc) \ 38 V(ArmUbfx) \ 39 V(ArmSbfx) \ 40 V(ArmSxtb) \ 41 V(ArmSxth) \ 42 V(ArmSxtab) \ 43 V(ArmSxtah) \ 44 V(ArmUxtb) \ 45 V(ArmUxth) \ 46 V(ArmUxtab) \ 47 V(ArmRbit) \ 48 V(ArmUxtah) \ 49 V(ArmAddPair) \ 50 V(ArmSubPair) \ 51 V(ArmMulPair) \ 52 V(ArmLslPair) \ 53 V(ArmLsrPair) \ 54 V(ArmAsrPair) \ 55 V(ArmVcmpF32) \ 56 V(ArmVaddF32) \ 57 V(ArmVsubF32) \ 58 V(ArmVmulF32) \ 59 V(ArmVmlaF32) \ 60 V(ArmVmlsF32) \ 61 V(ArmVdivF32) \ 62 V(ArmVabsF32) \ 63 V(ArmVnegF32) \ 64 V(ArmVsqrtF32) \ 65 V(ArmVcmpF64) \ 66 V(ArmVaddF64) \ 67 V(ArmVsubF64) \ 68 V(ArmVmulF64) \ 69 V(ArmVmlaF64) \ 70 V(ArmVmlsF64) \ 71 V(ArmVdivF64) \ 72 V(ArmVmodF64) \ 73 V(ArmVabsF64) \ 74 V(ArmVnegF64) \ 75 V(ArmVsqrtF64) \ 76 V(ArmVrintmF32) \ 77 V(ArmVrintmF64) \ 78 V(ArmVrintpF32) \ 79 V(ArmVrintpF64) \ 80 V(ArmVrintzF32) \ 81 V(ArmVrintzF64) \ 82 V(ArmVrintaF64) \ 83 V(ArmVrintnF32) \ 84 V(ArmVrintnF64) \ 85 V(ArmVcvtF32F64) \ 86 V(ArmVcvtF64F32) \ 87 V(ArmVcvtF32S32) \ 88 V(ArmVcvtF32U32) \ 89 V(ArmVcvtF64S32) \ 90 V(ArmVcvtF64U32) \ 91 V(ArmVcvtS32F32) \ 92 V(ArmVcvtU32F32) \ 93 V(ArmVcvtS32F64) \ 94 V(ArmVcvtU32F64) \ 95 V(ArmVmovU32F32) \ 96 V(ArmVmovF32U32) \ 97 V(ArmVmovLowU32F64) \ 98 V(ArmVmovLowF64U32) \ 99 V(ArmVmovHighU32F64) \ 100 V(ArmVmovHighF64U32) \ 101 V(ArmVmovF64U32U32) \ 102 V(ArmVldrF32) \ 103 V(ArmVstrF32) \ 104 V(ArmVldrF64) \ 105 V(ArmVstrF64) \ 106 V(ArmFloat32Max) \ 107 V(ArmFloat32Min) \ 108 V(ArmFloat64Max) \ 109 V(ArmFloat64Min) \ 110 V(ArmFloat64SilenceNaN) \ 111 V(ArmLdrb) \ 112 V(ArmLdrsb) \ 113 V(ArmStrb) \ 114 V(ArmLdrh) \ 115 V(ArmLdrsh) \ 116 V(ArmStrh) \ 117 V(ArmLdr) \ 118 V(ArmStr) \ 119 V(ArmPush) \ 120 V(ArmPoke) 121 122 // Addressing modes represent the "shape" of inputs to an instruction. 123 // Many instructions support multiple addressing modes. Addressing modes 124 // are encoded into the InstructionCode of the instruction and tell the 125 // code generator after register allocation which assembler method to call. 126 #define TARGET_ADDRESSING_MODE_LIST(V) \ 127 V(Offset_RI) /* [%r0 + K] */ \ 128 V(Offset_RR) /* [%r0 + %r1] */ \ 129 V(Operand2_I) /* K */ \ 130 V(Operand2_R) /* %r0 */ \ 131 V(Operand2_R_ASR_I) /* %r0 ASR K */ \ 132 V(Operand2_R_LSL_I) /* %r0 LSL K */ \ 133 V(Operand2_R_LSR_I) /* %r0 LSR K */ \ 134 V(Operand2_R_ROR_I) /* %r0 ROR K */ \ 135 V(Operand2_R_ASR_R) /* %r0 ASR %r1 */ \ 136 V(Operand2_R_LSL_R) /* %r0 LSL %r1 */ \ 137 V(Operand2_R_LSR_R) /* %r0 LSR %r1 */ \ 138 V(Operand2_R_ROR_R) /* %r0 ROR %r1 */ 139 140 } // namespace compiler 141 } // namespace internal 142 } // namespace v8 143 144 #endif // V8_COMPILER_ARM_INSTRUCTION_CODES_ARM_H_ 145