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_MIPS_INSTRUCTION_CODES_MIPS_H_ 6 #define V8_COMPILER_MIPS_INSTRUCTION_CODES_MIPS_H_ 7 8 namespace v8 { 9 namespace internal { 10 namespace compiler { 11 12 // MIPS-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(MipsAdd) \ 16 V(MipsAddOvf) \ 17 V(MipsSub) \ 18 V(MipsSubOvf) \ 19 V(MipsMul) \ 20 V(MipsMulOvf) \ 21 V(MipsMulHigh) \ 22 V(MipsMulHighU) \ 23 V(MipsDiv) \ 24 V(MipsDivU) \ 25 V(MipsMod) \ 26 V(MipsModU) \ 27 V(MipsAnd) \ 28 V(MipsOr) \ 29 V(MipsNor) \ 30 V(MipsXor) \ 31 V(MipsClz) \ 32 V(MipsCtz) \ 33 V(MipsPopcnt) \ 34 V(MipsLsa) \ 35 V(MipsShl) \ 36 V(MipsShr) \ 37 V(MipsSar) \ 38 V(MipsShlPair) \ 39 V(MipsShrPair) \ 40 V(MipsSarPair) \ 41 V(MipsExt) \ 42 V(MipsIns) \ 43 V(MipsRor) \ 44 V(MipsMov) \ 45 V(MipsTst) \ 46 V(MipsCmp) \ 47 V(MipsCmpS) \ 48 V(MipsAddS) \ 49 V(MipsSubS) \ 50 V(MipsMulS) \ 51 V(MipsDivS) \ 52 V(MipsModS) \ 53 V(MipsAbsS) \ 54 V(MipsSqrtS) \ 55 V(MipsMaxS) \ 56 V(MipsMinS) \ 57 V(MipsCmpD) \ 58 V(MipsAddD) \ 59 V(MipsSubD) \ 60 V(MipsMulD) \ 61 V(MipsDivD) \ 62 V(MipsModD) \ 63 V(MipsAbsD) \ 64 V(MipsSqrtD) \ 65 V(MipsMaxD) \ 66 V(MipsMinD) \ 67 V(MipsNegS) \ 68 V(MipsNegD) \ 69 V(MipsAddPair) \ 70 V(MipsSubPair) \ 71 V(MipsMulPair) \ 72 V(MipsMaddS) \ 73 V(MipsMaddD) \ 74 V(MipsMaddfS) \ 75 V(MipsMaddfD) \ 76 V(MipsMsubS) \ 77 V(MipsMsubD) \ 78 V(MipsMsubfS) \ 79 V(MipsMsubfD) \ 80 V(MipsFloat32RoundDown) \ 81 V(MipsFloat32RoundTruncate) \ 82 V(MipsFloat32RoundUp) \ 83 V(MipsFloat32RoundTiesEven) \ 84 V(MipsFloat64RoundDown) \ 85 V(MipsFloat64RoundTruncate) \ 86 V(MipsFloat64RoundUp) \ 87 V(MipsFloat64RoundTiesEven) \ 88 V(MipsCvtSD) \ 89 V(MipsCvtDS) \ 90 V(MipsTruncWD) \ 91 V(MipsRoundWD) \ 92 V(MipsFloorWD) \ 93 V(MipsCeilWD) \ 94 V(MipsTruncWS) \ 95 V(MipsRoundWS) \ 96 V(MipsFloorWS) \ 97 V(MipsCeilWS) \ 98 V(MipsTruncUwD) \ 99 V(MipsTruncUwS) \ 100 V(MipsCvtDW) \ 101 V(MipsCvtDUw) \ 102 V(MipsCvtSW) \ 103 V(MipsCvtSUw) \ 104 V(MipsLb) \ 105 V(MipsLbu) \ 106 V(MipsSb) \ 107 V(MipsLh) \ 108 V(MipsUlh) \ 109 V(MipsLhu) \ 110 V(MipsUlhu) \ 111 V(MipsSh) \ 112 V(MipsUsh) \ 113 V(MipsLw) \ 114 V(MipsUlw) \ 115 V(MipsSw) \ 116 V(MipsUsw) \ 117 V(MipsLwc1) \ 118 V(MipsUlwc1) \ 119 V(MipsSwc1) \ 120 V(MipsUswc1) \ 121 V(MipsLdc1) \ 122 V(MipsUldc1) \ 123 V(MipsSdc1) \ 124 V(MipsUsdc1) \ 125 V(MipsFloat64ExtractLowWord32) \ 126 V(MipsFloat64ExtractHighWord32) \ 127 V(MipsFloat64InsertLowWord32) \ 128 V(MipsFloat64InsertHighWord32) \ 129 V(MipsFloat64SilenceNaN) \ 130 V(MipsFloat32Max) \ 131 V(MipsFloat64Max) \ 132 V(MipsFloat32Min) \ 133 V(MipsFloat64Min) \ 134 V(MipsPush) \ 135 V(MipsStoreToStackSlot) \ 136 V(MipsByteSwap32) \ 137 V(MipsStackClaim) \ 138 V(MipsSeb) \ 139 V(MipsSeh) 140 141 // Addressing modes represent the "shape" of inputs to an instruction. 142 // Many instructions support multiple addressing modes. Addressing modes 143 // are encoded into the InstructionCode of the instruction and tell the 144 // code generator after register allocation which assembler method to call. 145 // 146 // We use the following local notation for addressing modes: 147 // 148 // R = register 149 // O = register or stack slot 150 // D = double register 151 // I = immediate (handle, external, int32) 152 // MRI = [register + immediate] 153 // MRR = [register + register] 154 // TODO(plind): Add the new r6 address modes. 155 #define TARGET_ADDRESSING_MODE_LIST(V) \ 156 V(MRI) /* [%r0 + K] */ \ 157 V(MRR) /* [%r0 + %r1] */ 158 159 160 } // namespace compiler 161 } // namespace internal 162 } // namespace v8 163 164 #endif // V8_COMPILER_MIPS_INSTRUCTION_CODES_MIPS_H_ 165