instruction-codes-mips64.h 5.89 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef V8_COMPILER_MIPS_INSTRUCTION_CODES_MIPS_H_
#define V8_COMPILER_MIPS_INSTRUCTION_CODES_MIPS_H_

namespace v8 {
namespace internal {
namespace compiler {

// MIPS64-specific opcodes that specify which assembly sequence to emit.
// Most opcodes specify a single instruction.
14 15 16
#define TARGET_ARCH_OPCODE_LIST(V)  \
  V(Mips64Add)                      \
  V(Mips64Dadd)                     \
17
  V(Mips64DaddOvf)                  \
18 19
  V(Mips64Sub)                      \
  V(Mips64Dsub)                     \
20
  V(Mips64DsubOvf)                  \
21 22
  V(Mips64Mul)                      \
  V(Mips64MulHigh)                  \
23
  V(Mips64DMulHigh)                 \
24 25 26 27 28 29 30 31 32 33 34 35
  V(Mips64MulHighU)                 \
  V(Mips64Dmul)                     \
  V(Mips64Div)                      \
  V(Mips64Ddiv)                     \
  V(Mips64DivU)                     \
  V(Mips64DdivU)                    \
  V(Mips64Mod)                      \
  V(Mips64Dmod)                     \
  V(Mips64ModU)                     \
  V(Mips64DmodU)                    \
  V(Mips64And)                      \
  V(Mips64Or)                       \
36
  V(Mips64Nor)                      \
37
  V(Mips64Xor)                      \
38
  V(Mips64Clz)                      \
39 40
  V(Mips64Lsa)                      \
  V(Mips64Dlsa)                     \
41 42 43 44
  V(Mips64Shl)                      \
  V(Mips64Shr)                      \
  V(Mips64Sar)                      \
  V(Mips64Ext)                      \
45
  V(Mips64Ins)                      \
46
  V(Mips64Dext)                     \
47
  V(Mips64Dins)                     \
48
  V(Mips64Dclz)                     \
49 50 51 52
  V(Mips64Ctz)                      \
  V(Mips64Dctz)                     \
  V(Mips64Popcnt)                   \
  V(Mips64Dpopcnt)                  \
53 54 55 56 57 58 59 60
  V(Mips64Dshl)                     \
  V(Mips64Dshr)                     \
  V(Mips64Dsar)                     \
  V(Mips64Ror)                      \
  V(Mips64Dror)                     \
  V(Mips64Mov)                      \
  V(Mips64Tst)                      \
  V(Mips64Cmp)                      \
61 62 63 64 65 66
  V(Mips64CmpS)                     \
  V(Mips64AddS)                     \
  V(Mips64SubS)                     \
  V(Mips64MulS)                     \
  V(Mips64DivS)                     \
  V(Mips64ModS)                     \
67
  V(Mips64AbsS)                     \
68
  V(Mips64SqrtS)                    \
69 70
  V(Mips64MaxS)                     \
  V(Mips64MinS)                     \
71 72 73 74 75 76
  V(Mips64CmpD)                     \
  V(Mips64AddD)                     \
  V(Mips64SubD)                     \
  V(Mips64MulD)                     \
  V(Mips64DivD)                     \
  V(Mips64ModD)                     \
77
  V(Mips64AbsD)                     \
78
  V(Mips64SqrtD)                    \
79 80
  V(Mips64MaxD)                     \
  V(Mips64MinD)                     \
81 82 83
  V(Mips64Float64RoundDown)         \
  V(Mips64Float64RoundTruncate)     \
  V(Mips64Float64RoundUp)           \
84
  V(Mips64Float64RoundTiesEven)     \
85 86 87 88
  V(Mips64Float32RoundDown)         \
  V(Mips64Float32RoundTruncate)     \
  V(Mips64Float32RoundUp)           \
  V(Mips64Float32RoundTiesEven)     \
89 90 91
  V(Mips64CvtSD)                    \
  V(Mips64CvtDS)                    \
  V(Mips64TruncWD)                  \
92 93 94
  V(Mips64RoundWD)                  \
  V(Mips64FloorWD)                  \
  V(Mips64CeilWD)                   \
95 96 97 98
  V(Mips64TruncWS)                  \
  V(Mips64RoundWS)                  \
  V(Mips64FloorWS)                  \
  V(Mips64CeilWS)                   \
99
  V(Mips64TruncLS)                  \
100
  V(Mips64TruncLD)                  \
101
  V(Mips64TruncUwD)                 \
102
  V(Mips64TruncUwS)                 \
103
  V(Mips64TruncUlS)                 \
104
  V(Mips64TruncUlD)                 \
105
  V(Mips64CvtDW)                    \
106
  V(Mips64CvtSL)                    \
107
  V(Mips64CvtSW)                    \
108
  V(Mips64CvtSUw)                   \
109
  V(Mips64CvtSUl)                   \
110
  V(Mips64CvtDL)                    \
111
  V(Mips64CvtDUw)                   \
112
  V(Mips64CvtDUl)                   \
113 114 115 116 117 118 119 120 121 122 123 124 125 126
  V(Mips64Lb)                       \
  V(Mips64Lbu)                      \
  V(Mips64Sb)                       \
  V(Mips64Lh)                       \
  V(Mips64Lhu)                      \
  V(Mips64Sh)                       \
  V(Mips64Ld)                       \
  V(Mips64Lw)                       \
  V(Mips64Sw)                       \
  V(Mips64Sd)                       \
  V(Mips64Lwc1)                     \
  V(Mips64Swc1)                     \
  V(Mips64Ldc1)                     \
  V(Mips64Sdc1)                     \
127 128
  V(Mips64BitcastDL)                \
  V(Mips64BitcastLD)                \
129 130 131 132
  V(Mips64Float64ExtractLowWord32)  \
  V(Mips64Float64ExtractHighWord32) \
  V(Mips64Float64InsertLowWord32)   \
  V(Mips64Float64InsertHighWord32)  \
133 134 135 136
  V(Mips64Float64Max)               \
  V(Mips64Float64Min)               \
  V(Mips64Float32Max)               \
  V(Mips64Float32Min)               \
137 138
  V(Mips64Push)                     \
  V(Mips64StoreToStackSlot)         \
139
  V(Mips64StackClaim)
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164

// Addressing modes represent the "shape" of inputs to an instruction.
// Many instructions support multiple addressing modes. Addressing modes
// are encoded into the InstructionCode of the instruction and tell the
// code generator after register allocation which assembler method to call.
//
// We use the following local notation for addressing modes:
//
// R = register
// O = register or stack slot
// D = double register
// I = immediate (handle, external, int32)
// MRI = [register + immediate]
// MRR = [register + register]
// TODO(plind): Add the new r6 address modes.
#define TARGET_ADDRESSING_MODE_LIST(V) \
  V(MRI) /* [%r0 + K] */               \
  V(MRR) /* [%r0 + %r1] */


}  // namespace compiler
}  // namespace internal
}  // namespace v8

#endif  // V8_COMPILER_MIPS_INSTRUCTION_CODES_MIPS_H_