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_BACKEND_S390_INSTRUCTION_CODES_S390_H_ 6 #define V8_COMPILER_BACKEND_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_Peek) \ 16 V(S390_Abs32) \ 17 V(S390_Abs64) \ 18 V(S390_And32) \ 19 V(S390_And64) \ 20 V(S390_Or32) \ 21 V(S390_Or64) \ 22 V(S390_Xor32) \ 23 V(S390_Xor64) \ 24 V(S390_ShiftLeft32) \ 25 V(S390_ShiftLeft64) \ 26 V(S390_ShiftLeftPair) \ 27 V(S390_ShiftRight32) \ 28 V(S390_ShiftRight64) \ 29 V(S390_ShiftRightPair) \ 30 V(S390_ShiftRightArith32) \ 31 V(S390_ShiftRightArith64) \ 32 V(S390_ShiftRightArithPair) \ 33 V(S390_RotRight32) \ 34 V(S390_RotRight64) \ 35 V(S390_Not32) \ 36 V(S390_Not64) \ 37 V(S390_RotLeftAndClear64) \ 38 V(S390_RotLeftAndClearLeft64) \ 39 V(S390_RotLeftAndClearRight64) \ 40 V(S390_Lay) \ 41 V(S390_Add32) \ 42 V(S390_Add64) \ 43 V(S390_AddPair) \ 44 V(S390_AddFloat) \ 45 V(S390_AddDouble) \ 46 V(S390_Sub32) \ 47 V(S390_Sub64) \ 48 V(S390_SubFloat) \ 49 V(S390_SubDouble) \ 50 V(S390_SubPair) \ 51 V(S390_MulPair) \ 52 V(S390_Mul32) \ 53 V(S390_Mul32WithOverflow) \ 54 V(S390_Mul64) \ 55 V(S390_MulHigh32) \ 56 V(S390_MulHighU32) \ 57 V(S390_MulFloat) \ 58 V(S390_MulDouble) \ 59 V(S390_Div32) \ 60 V(S390_Div64) \ 61 V(S390_DivU32) \ 62 V(S390_DivU64) \ 63 V(S390_DivFloat) \ 64 V(S390_DivDouble) \ 65 V(S390_Mod32) \ 66 V(S390_Mod64) \ 67 V(S390_ModU32) \ 68 V(S390_ModU64) \ 69 V(S390_ModDouble) \ 70 V(S390_Neg32) \ 71 V(S390_Neg64) \ 72 V(S390_NegDouble) \ 73 V(S390_NegFloat) \ 74 V(S390_SqrtFloat) \ 75 V(S390_FloorFloat) \ 76 V(S390_CeilFloat) \ 77 V(S390_TruncateFloat) \ 78 V(S390_AbsFloat) \ 79 V(S390_SqrtDouble) \ 80 V(S390_FloorDouble) \ 81 V(S390_CeilDouble) \ 82 V(S390_TruncateDouble) \ 83 V(S390_RoundDouble) \ 84 V(S390_MaxFloat) \ 85 V(S390_MaxDouble) \ 86 V(S390_MinFloat) \ 87 V(S390_MinDouble) \ 88 V(S390_AbsDouble) \ 89 V(S390_Cntlz32) \ 90 V(S390_Cntlz64) \ 91 V(S390_Popcnt32) \ 92 V(S390_Popcnt64) \ 93 V(S390_Cmp32) \ 94 V(S390_Cmp64) \ 95 V(S390_CmpFloat) \ 96 V(S390_CmpDouble) \ 97 V(S390_Tst32) \ 98 V(S390_Tst64) \ 99 V(S390_Push) \ 100 V(S390_PushFrame) \ 101 V(S390_StackClaim) \ 102 V(S390_StoreToStackSlot) \ 103 V(S390_SignExtendWord8ToInt32) \ 104 V(S390_SignExtendWord16ToInt32) \ 105 V(S390_SignExtendWord8ToInt64) \ 106 V(S390_SignExtendWord16ToInt64) \ 107 V(S390_SignExtendWord32ToInt64) \ 108 V(S390_Uint32ToUint64) \ 109 V(S390_Int64ToInt32) \ 110 V(S390_Int64ToFloat32) \ 111 V(S390_Int64ToDouble) \ 112 V(S390_Uint64ToFloat32) \ 113 V(S390_Uint64ToDouble) \ 114 V(S390_Int32ToFloat32) \ 115 V(S390_Int32ToDouble) \ 116 V(S390_Uint32ToFloat32) \ 117 V(S390_Uint32ToDouble) \ 118 V(S390_Float32ToInt64) \ 119 V(S390_Float32ToUint64) \ 120 V(S390_Float32ToInt32) \ 121 V(S390_Float32ToUint32) \ 122 V(S390_Float32ToDouble) \ 123 V(S390_Float64SilenceNaN) \ 124 V(S390_DoubleToInt32) \ 125 V(S390_DoubleToUint32) \ 126 V(S390_DoubleToInt64) \ 127 V(S390_DoubleToUint64) \ 128 V(S390_DoubleToFloat32) \ 129 V(S390_DoubleExtractLowWord32) \ 130 V(S390_DoubleExtractHighWord32) \ 131 V(S390_DoubleInsertLowWord32) \ 132 V(S390_DoubleInsertHighWord32) \ 133 V(S390_DoubleConstruct) \ 134 V(S390_BitcastInt32ToFloat32) \ 135 V(S390_BitcastFloat32ToInt32) \ 136 V(S390_BitcastInt64ToDouble) \ 137 V(S390_BitcastDoubleToInt64) \ 138 V(S390_LoadWordS8) \ 139 V(S390_LoadWordU8) \ 140 V(S390_LoadWordS16) \ 141 V(S390_LoadWordU16) \ 142 V(S390_LoadWordS32) \ 143 V(S390_LoadWordU32) \ 144 V(S390_LoadAndTestWord32) \ 145 V(S390_LoadAndTestWord64) \ 146 V(S390_LoadAndTestFloat32) \ 147 V(S390_LoadAndTestFloat64) \ 148 V(S390_LoadReverse16RR) \ 149 V(S390_LoadReverse32RR) \ 150 V(S390_LoadReverse64RR) \ 151 V(S390_LoadReverseSimd128RR) \ 152 V(S390_LoadReverseSimd128) \ 153 V(S390_LoadReverse16) \ 154 V(S390_LoadReverse32) \ 155 V(S390_LoadReverse64) \ 156 V(S390_LoadWord64) \ 157 V(S390_LoadFloat32) \ 158 V(S390_LoadDouble) \ 159 V(S390_StoreWord8) \ 160 V(S390_StoreWord16) \ 161 V(S390_StoreWord32) \ 162 V(S390_StoreWord64) \ 163 V(S390_StoreReverse16) \ 164 V(S390_StoreReverse32) \ 165 V(S390_StoreReverse64) \ 166 V(S390_StoreReverseSimd128) \ 167 V(S390_StoreFloat32) \ 168 V(S390_StoreDouble) \ 169 V(S390_CompressSigned) \ 170 V(S390_CompressPointer) \ 171 V(S390_CompressAny) \ 172 V(S390_Word64AtomicExchangeUint8) \ 173 V(S390_Word64AtomicExchangeUint16) \ 174 V(S390_Word64AtomicExchangeUint32) \ 175 V(S390_Word64AtomicExchangeUint64) \ 176 V(S390_Word64AtomicCompareExchangeUint8) \ 177 V(S390_Word64AtomicCompareExchangeUint16) \ 178 V(S390_Word64AtomicCompareExchangeUint32) \ 179 V(S390_Word64AtomicCompareExchangeUint64) \ 180 V(S390_Word64AtomicAddUint8) \ 181 V(S390_Word64AtomicAddUint16) \ 182 V(S390_Word64AtomicAddUint32) \ 183 V(S390_Word64AtomicAddUint64) \ 184 V(S390_Word64AtomicSubUint8) \ 185 V(S390_Word64AtomicSubUint16) \ 186 V(S390_Word64AtomicSubUint32) \ 187 V(S390_Word64AtomicSubUint64) \ 188 V(S390_Word64AtomicAndUint8) \ 189 V(S390_Word64AtomicAndUint16) \ 190 V(S390_Word64AtomicAndUint32) \ 191 V(S390_Word64AtomicAndUint64) \ 192 V(S390_Word64AtomicOrUint8) \ 193 V(S390_Word64AtomicOrUint16) \ 194 V(S390_Word64AtomicOrUint32) \ 195 V(S390_Word64AtomicOrUint64) \ 196 V(S390_Word64AtomicXorUint8) \ 197 V(S390_Word64AtomicXorUint16) \ 198 V(S390_Word64AtomicXorUint32) \ 199 V(S390_Word64AtomicXorUint64) \ 200 V(S390_F64x2Splat) \ 201 V(S390_F64x2ReplaceLane) \ 202 V(S390_F64x2Abs) \ 203 V(S390_F64x2Neg) \ 204 V(S390_F64x2Sqrt) \ 205 V(S390_F64x2Add) \ 206 V(S390_F64x2Sub) \ 207 V(S390_F64x2Mul) \ 208 V(S390_F64x2Div) \ 209 V(S390_F64x2Eq) \ 210 V(S390_F64x2Ne) \ 211 V(S390_F64x2Lt) \ 212 V(S390_F64x2Le) \ 213 V(S390_F64x2Min) \ 214 V(S390_F64x2Max) \ 215 V(S390_F64x2ExtractLane) \ 216 V(S390_F64x2Qfma) \ 217 V(S390_F64x2Qfms) \ 218 V(S390_F64x2Pmin) \ 219 V(S390_F64x2Pmax) \ 220 V(S390_F64x2Ceil) \ 221 V(S390_F64x2Floor) \ 222 V(S390_F64x2Trunc) \ 223 V(S390_F64x2NearestInt) \ 224 V(S390_F32x4Splat) \ 225 V(S390_F32x4ExtractLane) \ 226 V(S390_F32x4ReplaceLane) \ 227 V(S390_F32x4Add) \ 228 V(S390_F32x4AddHoriz) \ 229 V(S390_F32x4Sub) \ 230 V(S390_F32x4Mul) \ 231 V(S390_F32x4Eq) \ 232 V(S390_F32x4Ne) \ 233 V(S390_F32x4Lt) \ 234 V(S390_F32x4Le) \ 235 V(S390_F32x4Abs) \ 236 V(S390_F32x4Neg) \ 237 V(S390_F32x4RecipApprox) \ 238 V(S390_F32x4RecipSqrtApprox) \ 239 V(S390_F32x4SConvertI32x4) \ 240 V(S390_F32x4UConvertI32x4) \ 241 V(S390_F32x4Sqrt) \ 242 V(S390_F32x4Div) \ 243 V(S390_F32x4Min) \ 244 V(S390_F32x4Max) \ 245 V(S390_F32x4Qfma) \ 246 V(S390_F32x4Qfms) \ 247 V(S390_F32x4Pmin) \ 248 V(S390_F32x4Pmax) \ 249 V(S390_F32x4Ceil) \ 250 V(S390_F32x4Floor) \ 251 V(S390_F32x4Trunc) \ 252 V(S390_F32x4NearestInt) \ 253 V(S390_I64x2Neg) \ 254 V(S390_I64x2Add) \ 255 V(S390_I64x2Sub) \ 256 V(S390_I64x2Shl) \ 257 V(S390_I64x2ShrS) \ 258 V(S390_I64x2ShrU) \ 259 V(S390_I64x2Mul) \ 260 V(S390_I64x2Splat) \ 261 V(S390_I64x2ReplaceLane) \ 262 V(S390_I64x2ExtractLane) \ 263 V(S390_I64x2Eq) \ 264 V(S390_I32x4Splat) \ 265 V(S390_I32x4ExtractLane) \ 266 V(S390_I32x4ReplaceLane) \ 267 V(S390_I32x4Add) \ 268 V(S390_I32x4AddHoriz) \ 269 V(S390_I32x4Sub) \ 270 V(S390_I32x4Mul) \ 271 V(S390_I32x4MinS) \ 272 V(S390_I32x4MinU) \ 273 V(S390_I32x4MaxS) \ 274 V(S390_I32x4MaxU) \ 275 V(S390_I32x4Eq) \ 276 V(S390_I32x4Ne) \ 277 V(S390_I32x4GtS) \ 278 V(S390_I32x4GeS) \ 279 V(S390_I32x4GtU) \ 280 V(S390_I32x4GeU) \ 281 V(S390_I32x4Neg) \ 282 V(S390_I32x4Shl) \ 283 V(S390_I32x4ShrS) \ 284 V(S390_I32x4ShrU) \ 285 V(S390_I32x4SConvertF32x4) \ 286 V(S390_I32x4UConvertF32x4) \ 287 V(S390_I32x4SConvertI16x8Low) \ 288 V(S390_I32x4SConvertI16x8High) \ 289 V(S390_I32x4UConvertI16x8Low) \ 290 V(S390_I32x4UConvertI16x8High) \ 291 V(S390_I32x4Abs) \ 292 V(S390_I32x4BitMask) \ 293 V(S390_I32x4DotI16x8S) \ 294 V(S390_I16x8Splat) \ 295 V(S390_I16x8ExtractLaneU) \ 296 V(S390_I16x8ExtractLaneS) \ 297 V(S390_I16x8ReplaceLane) \ 298 V(S390_I16x8Add) \ 299 V(S390_I16x8AddHoriz) \ 300 V(S390_I16x8Sub) \ 301 V(S390_I16x8Mul) \ 302 V(S390_I16x8MinS) \ 303 V(S390_I16x8MinU) \ 304 V(S390_I16x8MaxS) \ 305 V(S390_I16x8MaxU) \ 306 V(S390_I16x8Eq) \ 307 V(S390_I16x8Ne) \ 308 V(S390_I16x8GtS) \ 309 V(S390_I16x8GeS) \ 310 V(S390_I16x8GtU) \ 311 V(S390_I16x8GeU) \ 312 V(S390_I16x8Shl) \ 313 V(S390_I16x8ShrS) \ 314 V(S390_I16x8ShrU) \ 315 V(S390_I16x8Neg) \ 316 V(S390_I16x8SConvertI32x4) \ 317 V(S390_I16x8UConvertI32x4) \ 318 V(S390_I16x8SConvertI8x16Low) \ 319 V(S390_I16x8SConvertI8x16High) \ 320 V(S390_I16x8UConvertI8x16Low) \ 321 V(S390_I16x8UConvertI8x16High) \ 322 V(S390_I16x8AddSatS) \ 323 V(S390_I16x8SubSatS) \ 324 V(S390_I16x8AddSatU) \ 325 V(S390_I16x8SubSatU) \ 326 V(S390_I16x8RoundingAverageU) \ 327 V(S390_I16x8Abs) \ 328 V(S390_I16x8BitMask) \ 329 V(S390_I8x16Splat) \ 330 V(S390_I8x16ExtractLaneU) \ 331 V(S390_I8x16ExtractLaneS) \ 332 V(S390_I8x16ReplaceLane) \ 333 V(S390_I8x16Add) \ 334 V(S390_I8x16Sub) \ 335 V(S390_I8x16Mul) \ 336 V(S390_I8x16MinS) \ 337 V(S390_I8x16MinU) \ 338 V(S390_I8x16MaxS) \ 339 V(S390_I8x16MaxU) \ 340 V(S390_I8x16Eq) \ 341 V(S390_I8x16Ne) \ 342 V(S390_I8x16GtS) \ 343 V(S390_I8x16GeS) \ 344 V(S390_I8x16GtU) \ 345 V(S390_I8x16GeU) \ 346 V(S390_I8x16Shl) \ 347 V(S390_I8x16ShrS) \ 348 V(S390_I8x16ShrU) \ 349 V(S390_I8x16Neg) \ 350 V(S390_I8x16SConvertI16x8) \ 351 V(S390_I8x16UConvertI16x8) \ 352 V(S390_I8x16AddSatS) \ 353 V(S390_I8x16SubSatS) \ 354 V(S390_I8x16AddSatU) \ 355 V(S390_I8x16SubSatU) \ 356 V(S390_I8x16RoundingAverageU) \ 357 V(S390_I8x16Abs) \ 358 V(S390_I8x16BitMask) \ 359 V(S390_I8x16Shuffle) \ 360 V(S390_I8x16Swizzle) \ 361 V(S390_V32x4AnyTrue) \ 362 V(S390_V16x8AnyTrue) \ 363 V(S390_V8x16AnyTrue) \ 364 V(S390_V32x4AllTrue) \ 365 V(S390_V16x8AllTrue) \ 366 V(S390_V8x16AllTrue) \ 367 V(S390_S128And) \ 368 V(S390_S128Or) \ 369 V(S390_S128Xor) \ 370 V(S390_S128Const) \ 371 V(S390_S128Zero) \ 372 V(S390_S128AllOnes) \ 373 V(S390_S128Not) \ 374 V(S390_S128Select) \ 375 V(S390_S128AndNot) \ 376 V(S390_StoreSimd128) \ 377 V(S390_LoadSimd128) \ 378 V(S390_StoreCompressTagged) \ 379 V(S390_LoadDecompressTaggedSigned) \ 380 V(S390_LoadDecompressTaggedPointer) \ 381 V(S390_LoadDecompressAnyTagged) 382 383 // Addressing modes represent the "shape" of inputs to an instruction. 384 // Many instructions support multiple addressing modes. Addressing modes 385 // are encoded into the InstructionCode of the instruction and tell the 386 // code generator after register allocation which assembler method to call. 387 // 388 // We use the following local notation for addressing modes: 389 // 390 // R = register 391 // O = register or stack slot 392 // D = double register 393 // I = immediate (handle, external, int32) 394 // MRI = [register + immediate] 395 // MRR = [register + register] 396 #define TARGET_ADDRESSING_MODE_LIST(V) \ 397 V(MR) /* [%r0 ] */ \ 398 V(MRI) /* [%r0 + K] */ \ 399 V(MRR) /* [%r0 + %r1 ] */ \ 400 V(MRRI) /* [%r0 + %r1 + K] */ 401 402 } // namespace compiler 403 } // namespace internal 404 } // namespace v8 405 406 #endif // V8_COMPILER_BACKEND_S390_INSTRUCTION_CODES_S390_H_ 407