Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_WASM_OPCODES_H_ | 5 #ifndef V8_WASM_OPCODES_H_ |
| 6 #define V8_WASM_OPCODES_H_ | 6 #define V8_WASM_OPCODES_H_ |
| 7 | 7 |
| 8 #include "src/machine-type.h" | 8 #include "src/machine-type.h" |
| 9 #include "src/signature.h" | 9 #include "src/signature.h" |
| 10 | 10 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 141 V(I32DivS, 0x43, i_ii) \ | 141 V(I32DivS, 0x43, i_ii) \ |
| 142 V(I32DivU, 0x44, i_ii) \ | 142 V(I32DivU, 0x44, i_ii) \ |
| 143 V(I32RemS, 0x45, i_ii) \ | 143 V(I32RemS, 0x45, i_ii) \ |
| 144 V(I32RemU, 0x46, i_ii) \ | 144 V(I32RemU, 0x46, i_ii) \ |
| 145 V(I32And, 0x47, i_ii) \ | 145 V(I32And, 0x47, i_ii) \ |
| 146 V(I32Ior, 0x48, i_ii) \ | 146 V(I32Ior, 0x48, i_ii) \ |
| 147 V(I32Xor, 0x49, i_ii) \ | 147 V(I32Xor, 0x49, i_ii) \ |
| 148 V(I32Shl, 0x4a, i_ii) \ | 148 V(I32Shl, 0x4a, i_ii) \ |
| 149 V(I32ShrU, 0x4b, i_ii) \ | 149 V(I32ShrU, 0x4b, i_ii) \ |
| 150 V(I32ShrS, 0x4c, i_ii) \ | 150 V(I32ShrS, 0x4c, i_ii) \ |
| 151 V(I32Eq, 0x4d, i_ii) \ | 151 V(I32Ror, 0x4d, i_ii) \ |
|
titzer
2016/03/02 22:17:40
Please don't renumber here, since other tools will
| |
| 152 V(I32Ne, 0x4e, i_ii) \ | 152 V(I32Rol, 0x4e, i_ii) \ |
| 153 V(I32LtS, 0x4f, i_ii) \ | 153 V(I32Eq, 0x4f, i_ii) \ |
| 154 V(I32LeS, 0x50, i_ii) \ | 154 V(I32Ne, 0x50, i_ii) \ |
| 155 V(I32LtU, 0x51, i_ii) \ | 155 V(I32LtS, 0x51, i_ii) \ |
| 156 V(I32LeU, 0x52, i_ii) \ | 156 V(I32LeS, 0x52, i_ii) \ |
| 157 V(I32GtS, 0x53, i_ii) \ | 157 V(I32LtU, 0x53, i_ii) \ |
| 158 V(I32GeS, 0x54, i_ii) \ | 158 V(I32LeU, 0x54, i_ii) \ |
| 159 V(I32GtU, 0x55, i_ii) \ | 159 V(I32GtS, 0x55, i_ii) \ |
| 160 V(I32GeU, 0x56, i_ii) \ | 160 V(I32GeS, 0x56, i_ii) \ |
| 161 V(I32Clz, 0x57, i_i) \ | 161 V(I32GtU, 0x57, i_ii) \ |
| 162 V(I32Ctz, 0x58, i_i) \ | 162 V(I32GeU, 0x58, i_ii) \ |
| 163 V(I32Popcnt, 0x59, i_i) \ | 163 V(I32Clz, 0x59, i_i) \ |
| 164 V(I32Eqz, 0x5a, i_i) \ | 164 V(I32Ctz, 0x5a, i_i) \ |
| 165 V(I64Add, 0x5b, l_ll) \ | 165 V(I32Popcnt, 0x5b, i_i) \ |
| 166 V(I64Sub, 0x5c, l_ll) \ | 166 V(I32Eqz, 0x5c, i_i) \ |
| 167 V(I64Mul, 0x5d, l_ll) \ | 167 V(I64Add, 0x5d, l_ll) \ |
| 168 V(I64DivS, 0x5e, l_ll) \ | 168 V(I64Sub, 0x5e, l_ll) \ |
| 169 V(I64DivU, 0x5f, l_ll) \ | 169 V(I64Mul, 0x5f, l_ll) \ |
| 170 V(I64RemS, 0x60, l_ll) \ | 170 V(I64DivS, 0x60, l_ll) \ |
| 171 V(I64RemU, 0x61, l_ll) \ | 171 V(I64DivU, 0x61, l_ll) \ |
| 172 V(I64And, 0x62, l_ll) \ | 172 V(I64RemS, 0x62, l_ll) \ |
| 173 V(I64Ior, 0x63, l_ll) \ | 173 V(I64RemU, 0x63, l_ll) \ |
| 174 V(I64Xor, 0x64, l_ll) \ | 174 V(I64And, 0x64, l_ll) \ |
| 175 V(I64Shl, 0x65, l_ll) \ | 175 V(I64Ior, 0x65, l_ll) \ |
| 176 V(I64ShrU, 0x66, l_ll) \ | 176 V(I64Xor, 0x66, l_ll) \ |
| 177 V(I64ShrS, 0x67, l_ll) \ | 177 V(I64Shl, 0x67, l_ll) \ |
| 178 V(I64Eq, 0x68, i_ll) \ | 178 V(I64ShrU, 0x68, l_ll) \ |
| 179 V(I64Ne, 0x69, i_ll) \ | 179 V(I64ShrS, 0x69, l_ll) \ |
| 180 V(I64LtS, 0x6a, i_ll) \ | 180 V(I64Ror, 0x6a, l_ll) \ |
| 181 V(I64LeS, 0x6b, i_ll) \ | 181 V(I64Rol, 0x6b, l_ll) \ |
| 182 V(I64LtU, 0x6c, i_ll) \ | 182 V(I64Eq, 0x6c, i_ll) \ |
| 183 V(I64LeU, 0x6d, i_ll) \ | 183 V(I64Ne, 0x6d, i_ll) \ |
| 184 V(I64GtS, 0x6e, i_ll) \ | 184 V(I64LtS, 0x6e, i_ll) \ |
| 185 V(I64GeS, 0x6f, i_ll) \ | 185 V(I64LeS, 0x6f, i_ll) \ |
| 186 V(I64GtU, 0x70, i_ll) \ | 186 V(I64LtU, 0x70, i_ll) \ |
| 187 V(I64GeU, 0x71, i_ll) \ | 187 V(I64LeU, 0x71, i_ll) \ |
| 188 V(I64Clz, 0x72, l_l) \ | 188 V(I64GtS, 0x72, i_ll) \ |
| 189 V(I64Ctz, 0x73, l_l) \ | 189 V(I64GeS, 0x73, i_ll) \ |
| 190 V(I64Popcnt, 0x74, l_l) \ | 190 V(I64GtU, 0x74, i_ll) \ |
| 191 V(F32Add, 0x75, f_ff) \ | 191 V(I64GeU, 0x75, i_ll) \ |
| 192 V(F32Sub, 0x76, f_ff) \ | 192 V(I64Clz, 0x76, l_l) \ |
| 193 V(F32Mul, 0x77, f_ff) \ | 193 V(I64Ctz, 0x77, l_l) \ |
| 194 V(F32Div, 0x78, f_ff) \ | 194 V(I64Popcnt, 0x78, l_l) \ |
| 195 V(F32Min, 0x79, f_ff) \ | 195 V(F32Add, 0x79, f_ff) \ |
| 196 V(F32Max, 0x7a, f_ff) \ | 196 V(F32Sub, 0x7a, f_ff) \ |
| 197 V(F32Abs, 0x7b, f_f) \ | 197 V(F32Mul, 0x7b, f_ff) \ |
| 198 V(F32Neg, 0x7c, f_f) \ | 198 V(F32Div, 0x7c, f_ff) \ |
| 199 V(F32CopySign, 0x7d, f_ff) \ | 199 V(F32Min, 0x7d, f_ff) \ |
| 200 V(F32Ceil, 0x7e, f_f) \ | 200 V(F32Max, 0x7e, f_ff) \ |
| 201 V(F32Floor, 0x7f, f_f) \ | 201 V(F32Abs, 0x7f, f_f) \ |
| 202 V(F32Trunc, 0x80, f_f) \ | 202 V(F32Neg, 0x80, f_f) \ |
| 203 V(F32NearestInt, 0x81, f_f) \ | 203 V(F32CopySign, 0x81, f_ff) \ |
| 204 V(F32Sqrt, 0x82, f_f) \ | 204 V(F32Ceil, 0x82, f_f) \ |
| 205 V(F32Eq, 0x83, i_ff) \ | 205 V(F32Floor, 0x83, f_f) \ |
| 206 V(F32Ne, 0x84, i_ff) \ | 206 V(F32Trunc, 0x84, f_f) \ |
| 207 V(F32Lt, 0x85, i_ff) \ | 207 V(F32NearestInt, 0x85, f_f) \ |
| 208 V(F32Le, 0x86, i_ff) \ | 208 V(F32Sqrt, 0x86, f_f) \ |
| 209 V(F32Gt, 0x87, i_ff) \ | 209 V(F32Eq, 0x87, i_ff) \ |
| 210 V(F32Ge, 0x88, i_ff) \ | 210 V(F32Ne, 0x88, i_ff) \ |
| 211 V(F64Add, 0x89, d_dd) \ | 211 V(F32Lt, 0x89, i_ff) \ |
| 212 V(F64Sub, 0x8a, d_dd) \ | 212 V(F32Le, 0x8a, i_ff) \ |
| 213 V(F64Mul, 0x8b, d_dd) \ | 213 V(F32Gt, 0x8b, i_ff) \ |
| 214 V(F64Div, 0x8c, d_dd) \ | 214 V(F32Ge, 0x8c, i_ff) \ |
| 215 V(F64Min, 0x8d, d_dd) \ | 215 V(F64Add, 0x8d, d_dd) \ |
| 216 V(F64Max, 0x8e, d_dd) \ | 216 V(F64Sub, 0x8e, d_dd) \ |
| 217 V(F64Abs, 0x8f, d_d) \ | 217 V(F64Mul, 0x8f, d_dd) \ |
| 218 V(F64Neg, 0x90, d_d) \ | 218 V(F64Div, 0x90, d_dd) \ |
| 219 V(F64CopySign, 0x91, d_dd) \ | 219 V(F64Min, 0x91, d_dd) \ |
| 220 V(F64Ceil, 0x92, d_d) \ | 220 V(F64Max, 0x92, d_dd) \ |
| 221 V(F64Floor, 0x93, d_d) \ | 221 V(F64Abs, 0x93, d_d) \ |
| 222 V(F64Trunc, 0x94, d_d) \ | 222 V(F64Neg, 0x94, d_d) \ |
| 223 V(F64NearestInt, 0x95, d_d) \ | 223 V(F64CopySign, 0x95, d_dd) \ |
| 224 V(F64Sqrt, 0x96, d_d) \ | 224 V(F64Ceil, 0x96, d_d) \ |
| 225 V(F64Eq, 0x97, i_dd) \ | 225 V(F64Floor, 0x97, d_d) \ |
| 226 V(F64Ne, 0x98, i_dd) \ | 226 V(F64Trunc, 0x98, d_d) \ |
| 227 V(F64Lt, 0x99, i_dd) \ | 227 V(F64NearestInt, 0x99, d_d) \ |
| 228 V(F64Le, 0x9a, i_dd) \ | 228 V(F64Sqrt, 0x9a, d_d) \ |
| 229 V(F64Gt, 0x9b, i_dd) \ | 229 V(F64Eq, 0x9b, i_dd) \ |
| 230 V(F64Ge, 0x9c, i_dd) \ | 230 V(F64Ne, 0x9c, i_dd) \ |
| 231 V(I32SConvertF32, 0x9d, i_f) \ | 231 V(F64Lt, 0x9d, i_dd) \ |
| 232 V(I32SConvertF64, 0x9e, i_d) \ | 232 V(F64Le, 0x9e, i_dd) \ |
| 233 V(I32UConvertF32, 0x9f, i_f) \ | 233 V(F64Gt, 0x9f, i_dd) \ |
| 234 V(I32UConvertF64, 0xa0, i_d) \ | 234 V(F64Ge, 0xa0, i_dd) \ |
| 235 V(I32ConvertI64, 0xa1, i_l) \ | 235 V(I32SConvertF32, 0xa1, i_f) \ |
| 236 V(I64SConvertF32, 0xa2, l_f) \ | 236 V(I32SConvertF64, 0xa2, i_d) \ |
| 237 V(I64SConvertF64, 0xa3, l_d) \ | 237 V(I32UConvertF32, 0xa3, i_f) \ |
| 238 V(I64UConvertF32, 0xa4, l_f) \ | 238 V(I32UConvertF64, 0xa4, i_d) \ |
| 239 V(I64UConvertF64, 0xa5, l_d) \ | 239 V(I32ConvertI64, 0xa5, i_l) \ |
| 240 V(I64SConvertI32, 0xa6, l_i) \ | 240 V(I64SConvertF32, 0xa6, l_f) \ |
| 241 V(I64UConvertI32, 0xa7, l_i) \ | 241 V(I64SConvertF64, 0xa7, l_d) \ |
| 242 V(F32SConvertI32, 0xa8, f_i) \ | 242 V(I64UConvertF32, 0xa8, l_f) \ |
| 243 V(F32UConvertI32, 0xa9, f_i) \ | 243 V(I64UConvertF64, 0xa9, l_d) \ |
| 244 V(F32SConvertI64, 0xaa, f_l) \ | 244 V(I64SConvertI32, 0xaa, l_i) \ |
| 245 V(F32UConvertI64, 0xab, f_l) \ | 245 V(I64UConvertI32, 0xab, l_i) \ |
| 246 V(F32ConvertF64, 0xac, f_d) \ | 246 V(F32SConvertI32, 0xac, f_i) \ |
| 247 V(F32ReinterpretI32, 0xad, f_i) \ | 247 V(F32UConvertI32, 0xad, f_i) \ |
| 248 V(F64SConvertI32, 0xae, d_i) \ | 248 V(F32SConvertI64, 0xae, f_l) \ |
| 249 V(F64UConvertI32, 0xaf, d_i) \ | 249 V(F32UConvertI64, 0xaf, f_l) \ |
| 250 V(F64SConvertI64, 0xb0, d_l) \ | 250 V(F32ConvertF64, 0xb0, f_d) \ |
| 251 V(F64UConvertI64, 0xb1, d_l) \ | 251 V(F32ReinterpretI32, 0xb1, f_i) \ |
| 252 V(F64ConvertF32, 0xb2, d_f) \ | 252 V(F64SConvertI32, 0xb2, d_i) \ |
| 253 V(F64ReinterpretI64, 0xb3, d_l) \ | 253 V(F64UConvertI32, 0xb3, d_i) \ |
| 254 V(I32ReinterpretF32, 0xb4, i_f) \ | 254 V(F64SConvertI64, 0xb4, d_l) \ |
| 255 V(I64ReinterpretF64, 0xb5, l_d) | 255 V(F64UConvertI64, 0xb5, d_l) \ |
| 256 V(F64ConvertF32, 0xb6, d_f) \ | |
| 257 V(F64ReinterpretI64, 0xb7, d_l) \ | |
| 258 V(I32ReinterpretF32, 0xb8, i_f) \ | |
| 259 V(I64ReinterpretF64, 0xb9, l_d) | |
| 256 | 260 |
| 257 // All opcodes. | 261 // All opcodes. |
| 258 #define FOREACH_OPCODE(V) \ | 262 #define FOREACH_OPCODE(V) \ |
| 259 FOREACH_CONTROL_OPCODE(V) \ | 263 FOREACH_CONTROL_OPCODE(V) \ |
| 260 FOREACH_MISC_OPCODE(V) \ | 264 FOREACH_MISC_OPCODE(V) \ |
| 261 FOREACH_SIMPLE_OPCODE(V) \ | 265 FOREACH_SIMPLE_OPCODE(V) \ |
| 262 FOREACH_STORE_MEM_OPCODE(V) \ | 266 FOREACH_STORE_MEM_OPCODE(V) \ |
| 263 FOREACH_LOAD_MEM_OPCODE(V) \ | 267 FOREACH_LOAD_MEM_OPCODE(V) \ |
| 264 FOREACH_MISC_MEM_OPCODE(V) | 268 FOREACH_MISC_MEM_OPCODE(V) |
| 265 | 269 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 469 default: | 473 default: |
| 470 return "<unknown>"; | 474 return "<unknown>"; |
| 471 } | 475 } |
| 472 } | 476 } |
| 473 }; | 477 }; |
| 474 } // namespace wasm | 478 } // namespace wasm |
| 475 } // namespace internal | 479 } // namespace internal |
| 476 } // namespace v8 | 480 } // namespace v8 |
| 477 | 481 |
| 478 #endif // V8_WASM_OPCODES_H_ | 482 #endif // V8_WASM_OPCODES_H_ |
| OLD | NEW |