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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 V(F64Tan, 0xc5, d_d) \ | 254 V(F64Tan, 0xc5, d_d) \ |
255 V(F64Exp, 0xc6, d_d) \ | 255 V(F64Exp, 0xc6, d_d) \ |
256 V(F64Log, 0xc7, d_d) \ | 256 V(F64Log, 0xc7, d_d) \ |
257 V(F64Atan2, 0xc8, d_dd) \ | 257 V(F64Atan2, 0xc8, d_dd) \ |
258 V(F64Pow, 0xc9, d_dd) \ | 258 V(F64Pow, 0xc9, d_dd) \ |
259 V(F64Mod, 0xca, d_dd) \ | 259 V(F64Mod, 0xca, d_dd) \ |
260 V(I32AsmjsDivS, 0xd0, i_ii) \ | 260 V(I32AsmjsDivS, 0xd0, i_ii) \ |
261 V(I32AsmjsDivU, 0xd1, i_ii) \ | 261 V(I32AsmjsDivU, 0xd1, i_ii) \ |
262 V(I32AsmjsRemS, 0xd2, i_ii) \ | 262 V(I32AsmjsRemS, 0xd2, i_ii) \ |
263 V(I32AsmjsRemU, 0xd3, i_ii) \ | 263 V(I32AsmjsRemU, 0xd3, i_ii) \ |
| 264 V(I32AsmjsLoadMem8S, 0xd4, i_i) \ |
| 265 V(I32AsmjsLoadMem8U, 0xd5, i_i) \ |
| 266 V(I32AsmjsLoadMem16S, 0xd6, i_i) \ |
| 267 V(I32AsmjsLoadMem16U, 0xd7, i_i) \ |
| 268 V(I32AsmjsLoadMem, 0xd8, i_i) \ |
| 269 V(F32AsmjsLoadMem, 0xd9, f_i) \ |
| 270 V(F64AsmjsLoadMem, 0xda, d_i) \ |
| 271 V(I32AsmjsStoreMem8, 0xdb, i_ii) \ |
| 272 V(I32AsmjsStoreMem16, 0xdc, i_ii) \ |
| 273 V(I32AsmjsStoreMem, 0xdd, i_ii) \ |
| 274 V(F32AsmjsStoreMem, 0xde, f_if) \ |
| 275 V(F64AsmjsStoreMem, 0xdf, d_id) \ |
264 V(I32AsmjsSConvertF32, 0xe0, i_f) \ | 276 V(I32AsmjsSConvertF32, 0xe0, i_f) \ |
265 V(I32AsmjsUConvertF32, 0xe1, i_f) \ | 277 V(I32AsmjsUConvertF32, 0xe1, i_f) \ |
266 V(I32AsmjsSConvertF64, 0xe2, i_d) \ | 278 V(I32AsmjsSConvertF64, 0xe2, i_d) \ |
267 V(I32AsmjsUConvertF64, 0xe3, i_d) | 279 V(I32AsmjsUConvertF64, 0xe3, i_d) |
268 | 280 |
269 /* TODO(titzer): introduce compatibility opcodes for these asm.js ops \ | |
270 V(I32AsmjsLoad8S, 0xd4, i_i) \ \ | |
271 V(I32AsmjsLoad8U, 0xd5, i_i) \ \ | |
272 V(I32AsmjsLoad16S, 0xd6, i_i) \ \ | |
273 V(I32AsmjsLoad16U, 0xd7, i_i) \ \ | |
274 V(I32AsmjsLoad, 0xd8, i_i) \ \ | |
275 V(F32AsmjsLoad, 0xd9, f_i) \ \ | |
276 V(F64AsmjsLoad, 0xda, d_i) \ \ | |
277 V(I32AsmjsStore8, 0xdb, i_i) \ \ | |
278 V(I32AsmjsStore16, 0xdc, i_i) \ \ | |
279 V(I32AsmjsStore, 0xdd, i_ii) \ \ | |
280 V(F32AsmjsStore, 0xde, i_if) \ \ | |
281 V(F64AsmjsStore, 0xdf, i_id) \ \ | |
282 */ | |
283 | |
284 // All opcodes. | 281 // All opcodes. |
285 #define FOREACH_OPCODE(V) \ | 282 #define FOREACH_OPCODE(V) \ |
286 FOREACH_CONTROL_OPCODE(V) \ | 283 FOREACH_CONTROL_OPCODE(V) \ |
287 FOREACH_MISC_OPCODE(V) \ | 284 FOREACH_MISC_OPCODE(V) \ |
288 FOREACH_SIMPLE_OPCODE(V) \ | 285 FOREACH_SIMPLE_OPCODE(V) \ |
289 FOREACH_STORE_MEM_OPCODE(V) \ | 286 FOREACH_STORE_MEM_OPCODE(V) \ |
290 FOREACH_LOAD_MEM_OPCODE(V) \ | 287 FOREACH_LOAD_MEM_OPCODE(V) \ |
291 FOREACH_MISC_MEM_OPCODE(V) \ | 288 FOREACH_MISC_MEM_OPCODE(V) \ |
292 FOREACH_ASMJS_COMPAT_OPCODE(V) | 289 FOREACH_ASMJS_COMPAT_OPCODE(V) |
293 | 290 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 default: | 511 default: |
515 return "<unknown>"; | 512 return "<unknown>"; |
516 } | 513 } |
517 } | 514 } |
518 }; | 515 }; |
519 } // namespace wasm | 516 } // namespace wasm |
520 } // namespace internal | 517 } // namespace internal |
521 } // namespace v8 | 518 } // namespace v8 |
522 | 519 |
523 #endif // V8_WASM_OPCODES_H_ | 520 #endif // V8_WASM_OPCODES_H_ |
OLD | NEW |