#if !V8_ENABLE_WEBASSEMBLY
#error This header should only be included if WebAssembly is enabled.
#endif
#ifndef V8_WASM_SIMD_SHUFFLE_H_
#define V8_WASM_SIMD_SHUFFLE_H_
#include "src/base/macros.h"
#include "src/common/globals.h"
#include "src/compiler/backend/instruction-codes.h"
namespace v8 {
namespace internal {
namespace wasm {
#ifdef V8_TARGET_ARCH_X64
template <int simd_size,
typename = std::enable_if_t<simd_size == kSimd128Size ||
simd_size == kSimd256Size>>
struct ShuffleEntry {};
template <>
struct ShuffleEntry<kSimd128Size> {
uint8_t shuffle[kSimd128Size];
compiler::ArchOpcode opcode;
bool src0_needs_reg;
bool src1_needs_reg;
bool no_same_as_first_if_avx;
};
template <>
struct ShuffleEntry<kSimd256Size> {
uint8_t shuffle[kSimd256Size];
compiler::ArchOpcode opcode;
};
#endif
class V8_EXPORT_PRIVATE SimdShuffle { … };
class V8_EXPORT_PRIVATE SimdSwizzle { … };
}
}
}
#endif