Home | History | Annotate | Download | only in s390
      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_And)                      \
     16   V(S390_AndComplement)            \
     17   V(S390_Or)                       \
     18   V(S390_OrComplement)             \
     19   V(S390_Xor)                      \
     20   V(S390_ShiftLeft32)              \
     21   V(S390_ShiftLeft64)              \
     22   V(S390_ShiftLeftPair)            \
     23   V(S390_ShiftRight32)             \
     24   V(S390_ShiftRight64)             \
     25   V(S390_ShiftRightPair)           \
     26   V(S390_ShiftRightArith32)        \
     27   V(S390_ShiftRightArith64)        \
     28   V(S390_ShiftRightArithPair)      \
     29   V(S390_RotRight32)               \
     30   V(S390_RotRight64)               \
     31   V(S390_Not)                      \
     32   V(S390_RotLeftAndMask32)         \
     33   V(S390_RotLeftAndClear64)        \
     34   V(S390_RotLeftAndClearLeft64)    \
     35   V(S390_RotLeftAndClearRight64)   \
     36   V(S390_Add)                      \
     37   V(S390_AddWithOverflow32)        \
     38   V(S390_AddPair)                  \
     39   V(S390_AddFloat)                 \
     40   V(S390_AddDouble)                \
     41   V(S390_Sub)                      \
     42   V(S390_SubWithOverflow32)        \
     43   V(S390_SubFloat)                 \
     44   V(S390_SubDouble)                \
     45   V(S390_SubPair)                  \
     46   V(S390_MulPair)                  \
     47   V(S390_Mul32)                    \
     48   V(S390_Mul64)                    \
     49   V(S390_MulHigh32)                \
     50   V(S390_MulHighU32)               \
     51   V(S390_MulFloat)                 \
     52   V(S390_MulDouble)                \
     53   V(S390_Div32)                    \
     54   V(S390_Div64)                    \
     55   V(S390_DivU32)                   \
     56   V(S390_DivU64)                   \
     57   V(S390_DivFloat)                 \
     58   V(S390_DivDouble)                \
     59   V(S390_Mod32)                    \
     60   V(S390_Mod64)                    \
     61   V(S390_ModU32)                   \
     62   V(S390_ModU64)                   \
     63   V(S390_ModDouble)                \
     64   V(S390_Neg)                      \
     65   V(S390_NegDouble)                \
     66   V(S390_SqrtFloat)                \
     67   V(S390_FloorFloat)               \
     68   V(S390_CeilFloat)                \
     69   V(S390_TruncateFloat)            \
     70   V(S390_AbsFloat)                 \
     71   V(S390_SqrtDouble)               \
     72   V(S390_FloorDouble)              \
     73   V(S390_CeilDouble)               \
     74   V(S390_TruncateDouble)           \
     75   V(S390_RoundDouble)              \
     76   V(S390_MaxDouble)                \
     77   V(S390_MinDouble)                \
     78   V(S390_AbsDouble)                \
     79   V(S390_Cntlz32)                  \
     80   V(S390_Cntlz64)                  \
     81   V(S390_Popcnt32)                 \
     82   V(S390_Popcnt64)                 \
     83   V(S390_Cmp32)                    \
     84   V(S390_Cmp64)                    \
     85   V(S390_CmpFloat)                 \
     86   V(S390_CmpDouble)                \
     87   V(S390_Tst32)                    \
     88   V(S390_Tst64)                    \
     89   V(S390_Push)                     \
     90   V(S390_PushFrame)                \
     91   V(S390_StoreToStackSlot)         \
     92   V(S390_ExtendSignWord8)          \
     93   V(S390_ExtendSignWord16)         \
     94   V(S390_ExtendSignWord32)         \
     95   V(S390_Uint32ToUint64)           \
     96   V(S390_Int64ToInt32)             \
     97   V(S390_Int64ToFloat32)           \
     98   V(S390_Int64ToDouble)            \
     99   V(S390_Uint64ToFloat32)          \
    100   V(S390_Uint64ToDouble)           \
    101   V(S390_Int32ToFloat32)           \
    102   V(S390_Int32ToDouble)            \
    103   V(S390_Uint32ToFloat32)          \
    104   V(S390_Uint32ToDouble)           \
    105   V(S390_Float32ToInt64)           \
    106   V(S390_Float32ToUint64)          \
    107   V(S390_Float32ToInt32)           \
    108   V(S390_Float32ToUint32)          \
    109   V(S390_Float32ToDouble)          \
    110   V(S390_Float64SilenceNaN)        \
    111   V(S390_DoubleToInt32)            \
    112   V(S390_DoubleToUint32)           \
    113   V(S390_DoubleToInt64)            \
    114   V(S390_DoubleToUint64)           \
    115   V(S390_DoubleToFloat32)          \
    116   V(S390_DoubleExtractLowWord32)   \
    117   V(S390_DoubleExtractHighWord32)  \
    118   V(S390_DoubleInsertLowWord32)    \
    119   V(S390_DoubleInsertHighWord32)   \
    120   V(S390_DoubleConstruct)          \
    121   V(S390_BitcastInt32ToFloat32)    \
    122   V(S390_BitcastFloat32ToInt32)    \
    123   V(S390_BitcastInt64ToDouble)     \
    124   V(S390_BitcastDoubleToInt64)     \
    125   V(S390_LoadWordS8)               \
    126   V(S390_LoadWordU8)               \
    127   V(S390_LoadWordS16)              \
    128   V(S390_LoadWordU16)              \
    129   V(S390_LoadWordS32)              \
    130   V(S390_LoadWordU32)              \
    131   V(S390_LoadWord64)               \
    132   V(S390_LoadFloat32)              \
    133   V(S390_LoadDouble)               \
    134   V(S390_StoreWord8)               \
    135   V(S390_StoreWord16)              \
    136   V(S390_StoreWord32)              \
    137   V(S390_StoreWord64)              \
    138   V(S390_StoreFloat32)             \
    139   V(S390_StoreDouble)
    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 #define TARGET_ADDRESSING_MODE_LIST(V) \
    155   V(MRI) /* [%r0 + K] */               \
    156   V(MRR) /* [%r0 + %r1] */
    157 
    158 }  // namespace compiler
    159 }  // namespace internal
    160 }  // namespace v8
    161 
    162 #endif  // V8_COMPILER_S390_INSTRUCTION_CODES_S390_H_
    163