1 // Copyright 2015 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_S390_INSTRUCTION_CODES_S390_H_ 6 #define V8_COMPILER_S390_INSTRUCTION_CODES_S390_H_ 7 8 namespace v8 { 9 namespace internal { 10 namespace compiler { 11 12 // S390-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(S390_Abs32) \ 16 V(S390_Abs64) \ 17 V(S390_And32) \ 18 V(S390_And64) \ 19 V(S390_Or32) \ 20 V(S390_Or64) \ 21 V(S390_Xor32) \ 22 V(S390_Xor64) \ 23 V(S390_ShiftLeft32) \ 24 V(S390_ShiftLeft64) \ 25 V(S390_ShiftLeftPair) \ 26 V(S390_ShiftRight32) \ 27 V(S390_ShiftRight64) \ 28 V(S390_ShiftRightPair) \ 29 V(S390_ShiftRightArith32) \ 30 V(S390_ShiftRightArith64) \ 31 V(S390_ShiftRightArithPair) \ 32 V(S390_RotRight32) \ 33 V(S390_RotRight64) \ 34 V(S390_Not32) \ 35 V(S390_Not64) \ 36 V(S390_RotLeftAndClear64) \ 37 V(S390_RotLeftAndClearLeft64) \ 38 V(S390_RotLeftAndClearRight64) \ 39 V(S390_Lay) \ 40 V(S390_Add32) \ 41 V(S390_Add64) \ 42 V(S390_AddPair) \ 43 V(S390_AddFloat) \ 44 V(S390_AddDouble) \ 45 V(S390_Sub32) \ 46 V(S390_Sub64) \ 47 V(S390_SubFloat) \ 48 V(S390_SubDouble) \ 49 V(S390_SubPair) \ 50 V(S390_MulPair) \ 51 V(S390_Mul32) \ 52 V(S390_Mul32WithOverflow) \ 53 V(S390_Mul64) \ 54 V(S390_MulHigh32) \ 55 V(S390_MulHighU32) \ 56 V(S390_MulFloat) \ 57 V(S390_MulDouble) \ 58 V(S390_Div32) \ 59 V(S390_Div64) \ 60 V(S390_DivU32) \ 61 V(S390_DivU64) \ 62 V(S390_DivFloat) \ 63 V(S390_DivDouble) \ 64 V(S390_Mod32) \ 65 V(S390_Mod64) \ 66 V(S390_ModU32) \ 67 V(S390_ModU64) \ 68 V(S390_ModDouble) \ 69 V(S390_Neg32) \ 70 V(S390_Neg64) \ 71 V(S390_NegDouble) \ 72 V(S390_NegFloat) \ 73 V(S390_SqrtFloat) \ 74 V(S390_FloorFloat) \ 75 V(S390_CeilFloat) \ 76 V(S390_TruncateFloat) \ 77 V(S390_AbsFloat) \ 78 V(S390_SqrtDouble) \ 79 V(S390_FloorDouble) \ 80 V(S390_CeilDouble) \ 81 V(S390_TruncateDouble) \ 82 V(S390_RoundDouble) \ 83 V(S390_MaxFloat) \ 84 V(S390_MaxDouble) \ 85 V(S390_MinFloat) \ 86 V(S390_MinDouble) \ 87 V(S390_AbsDouble) \ 88 V(S390_Cntlz32) \ 89 V(S390_Cntlz64) \ 90 V(S390_Popcnt32) \ 91 V(S390_Popcnt64) \ 92 V(S390_Cmp32) \ 93 V(S390_Cmp64) \ 94 V(S390_CmpFloat) \ 95 V(S390_CmpDouble) \ 96 V(S390_Tst32) \ 97 V(S390_Tst64) \ 98 V(S390_Push) \ 99 V(S390_PushFrame) \ 100 V(S390_StackClaim) \ 101 V(S390_StoreToStackSlot) \ 102 V(S390_SignExtendWord8ToInt32) \ 103 V(S390_SignExtendWord16ToInt32) \ 104 V(S390_SignExtendWord8ToInt64) \ 105 V(S390_SignExtendWord16ToInt64) \ 106 V(S390_SignExtendWord32ToInt64) \ 107 V(S390_Uint32ToUint64) \ 108 V(S390_Int64ToInt32) \ 109 V(S390_Int64ToFloat32) \ 110 V(S390_Int64ToDouble) \ 111 V(S390_Uint64ToFloat32) \ 112 V(S390_Uint64ToDouble) \ 113 V(S390_Int32ToFloat32) \ 114 V(S390_Int32ToDouble) \ 115 V(S390_Uint32ToFloat32) \ 116 V(S390_Uint32ToDouble) \ 117 V(S390_Float32ToInt64) \ 118 V(S390_Float32ToUint64) \ 119 V(S390_Float32ToInt32) \ 120 V(S390_Float32ToUint32) \ 121 V(S390_Float32ToDouble) \ 122 V(S390_Float64SilenceNaN) \ 123 V(S390_DoubleToInt32) \ 124 V(S390_DoubleToUint32) \ 125 V(S390_DoubleToInt64) \ 126 V(S390_DoubleToUint64) \ 127 V(S390_DoubleToFloat32) \ 128 V(S390_DoubleExtractLowWord32) \ 129 V(S390_DoubleExtractHighWord32) \ 130 V(S390_DoubleInsertLowWord32) \ 131 V(S390_DoubleInsertHighWord32) \ 132 V(S390_DoubleConstruct) \ 133 V(S390_BitcastInt32ToFloat32) \ 134 V(S390_BitcastFloat32ToInt32) \ 135 V(S390_BitcastInt64ToDouble) \ 136 V(S390_BitcastDoubleToInt64) \ 137 V(S390_LoadWordS8) \ 138 V(S390_LoadWordU8) \ 139 V(S390_LoadWordS16) \ 140 V(S390_LoadWordU16) \ 141 V(S390_LoadWordS32) \ 142 V(S390_LoadWordU32) \ 143 V(S390_LoadAndTestWord32) \ 144 V(S390_LoadAndTestWord64) \ 145 V(S390_LoadAndTestFloat32) \ 146 V(S390_LoadAndTestFloat64) \ 147 V(S390_LoadReverse16RR) \ 148 V(S390_LoadReverse32RR) \ 149 V(S390_LoadReverse64RR) \ 150 V(S390_LoadReverse16) \ 151 V(S390_LoadReverse32) \ 152 V(S390_LoadReverse64) \ 153 V(S390_LoadWord64) \ 154 V(S390_LoadFloat32) \ 155 V(S390_LoadDouble) \ 156 V(S390_StoreWord8) \ 157 V(S390_StoreWord16) \ 158 V(S390_StoreWord32) \ 159 V(S390_StoreWord64) \ 160 V(S390_StoreReverse16) \ 161 V(S390_StoreReverse32) \ 162 V(S390_StoreReverse64) \ 163 V(S390_StoreFloat32) \ 164 V(S390_StoreDouble) 165 166 // Addressing modes represent the "shape" of inputs to an instruction. 167 // Many instructions support multiple addressing modes. Addressing modes 168 // are encoded into the InstructionCode of the instruction and tell the 169 // code generator after register allocation which assembler method to call. 170 // 171 // We use the following local notation for addressing modes: 172 // 173 // R = register 174 // O = register or stack slot 175 // D = double register 176 // I = immediate (handle, external, int32) 177 // MRI = [register + immediate] 178 // MRR = [register + register] 179 #define TARGET_ADDRESSING_MODE_LIST(V) \ 180 V(MR) /* [%r0 ] */ \ 181 V(MRI) /* [%r0 + K] */ \ 182 V(MRR) /* [%r0 + %r1 ] */ \ 183 V(MRRI) /* [%r0 + %r1 + K] */ 184 185 } // namespace compiler 186 } // namespace internal 187 } // namespace v8 188 189 #endif // V8_COMPILER_S390_INSTRUCTION_CODES_S390_H_ 190