OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 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_FUNCTION_BODY_DECODER_IMPL_H_ | 5 #ifndef V8_WASM_FUNCTION_BODY_DECODER_IMPL_H_ |
6 #define V8_WASM_FUNCTION_BODY_DECODER_IMPL_H_ | 6 #define V8_WASM_FUNCTION_BODY_DECODER_IMPL_H_ |
7 | 7 |
8 #include "src/wasm/decoder.h" | 8 #include "src/wasm/decoder.h" |
9 #include "src/wasm/wasm-opcodes.h" | 9 #include "src/wasm/wasm-opcodes.h" |
10 | 10 |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 template <bool checked> | 315 template <bool checked> |
316 struct SimdShiftOperand { | 316 struct SimdShiftOperand { |
317 uint8_t shift; | 317 uint8_t shift; |
318 unsigned length = 1; | 318 unsigned length = 1; |
319 | 319 |
320 inline SimdShiftOperand(Decoder* decoder, const byte* pc) { | 320 inline SimdShiftOperand(Decoder* decoder, const byte* pc) { |
321 shift = decoder->read_u8<checked>(pc + 2, "shift"); | 321 shift = decoder->read_u8<checked>(pc + 2, "shift"); |
322 } | 322 } |
323 }; | 323 }; |
324 | 324 |
| 325 // Operand for SIMD concatenation operations. |
| 326 template <bool checked> |
| 327 struct SimdConcatOperand { |
| 328 uint8_t bytes; |
| 329 unsigned length; |
| 330 |
| 331 inline SimdConcatOperand(Decoder* decoder, const byte* pc) { |
| 332 bytes = decoder->read_u8<checked>(pc + 2, "bytes"); |
| 333 length = 1; |
| 334 } |
| 335 }; |
| 336 |
325 #undef CHECKED_COND | 337 #undef CHECKED_COND |
326 | 338 |
327 } // namespace wasm | 339 } // namespace wasm |
328 } // namespace internal | 340 } // namespace internal |
329 } // namespace v8 | 341 } // namespace v8 |
330 | 342 |
331 #endif // V8_WASM_FUNCTION_BODY_DECODER_IMPL_H_ | 343 #endif // V8_WASM_FUNCTION_BODY_DECODER_IMPL_H_ |
OLD | NEW |