Commit f8445719 authored by Aseem Garg's avatar Aseem Garg Committed by Commit Bot

[wasm] Delete Simd unsigned int types for interpreter

R=gdeepti@chromium.org,bbudge@chromium.org,clemensh@chromium.org,titzer@chromium.org
BUG=v8:6020

Change-Id: I05bb2124751f64565ad4e22f267fe42a3e0f1845
Reviewed-on: https://chromium-review.googlesource.com/1070935
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53374}
parent a52ee2f5
......@@ -1669,45 +1669,65 @@ class ThreadImpl {
return true; \
}
BINOP_CASE(F32x4Add, f32x4, float4, 4, a + b)
BINOP_CASE(I32x4Add, i32x4, int4, 4, a + b)
BINOP_CASE(I16x8Add, i16x8, int8, 8, a + b)
BINOP_CASE(I8x16Add, i8x16, int16, 16, a + b)
BINOP_CASE(F32x4Sub, f32x4, float4, 4, a - b)
BINOP_CASE(I32x4Sub, i32x4, int4, 4, a - b)
BINOP_CASE(I16x8Sub, i16x8, int8, 8, a - b)
BINOP_CASE(I8x16Sub, i8x16, int16, 16, a - b)
BINOP_CASE(F32x4Mul, f32x4, float4, 4, a * b)
BINOP_CASE(I32x4Mul, i32x4, int4, 4, a * b)
BINOP_CASE(I16x8Mul, i16x8, int8, 8, a * b)
BINOP_CASE(I8x16Mul, i8x16, int16, 16, a * b)
BINOP_CASE(F32x4Min, f32x4, float4, 4, a < b ? a : b)
BINOP_CASE(I32x4MinS, i32x4, int4, 4, a < b ? a : b)
BINOP_CASE(I32x4MinU, ui32x4, uint4, 4, a < b ? a : b)
BINOP_CASE(I16x8MinS, i16x8, int8, 8, a < b ? a : b)
BINOP_CASE(I16x8MinU, ui16x8, uint8, 8, a < b ? a : b)
BINOP_CASE(I8x16MinS, i8x16, int16, 16, a < b ? a : b)
BINOP_CASE(I8x16MinU, ui8x16, uint16, 16, a < b ? a : b)
BINOP_CASE(F32x4Max, f32x4, float4, 4, a > b ? a : b)
BINOP_CASE(I32x4Add, i32x4, int4, 4, a + b)
BINOP_CASE(I32x4Sub, i32x4, int4, 4, a - b)
BINOP_CASE(I32x4Mul, i32x4, int4, 4, a * b)
BINOP_CASE(I32x4MinS, i32x4, int4, 4, a < b ? a : b)
BINOP_CASE(
I32x4MinU, i32x4, int4, 4,
*reinterpret_cast<uint32_t*>(&a) < *reinterpret_cast<uint32_t*>(&b)
? a
: b)
BINOP_CASE(I32x4MaxS, i32x4, int4, 4, a > b ? a : b)
BINOP_CASE(I32x4MaxU, ui32x4, uint4, 4, a > b ? a : b)
BINOP_CASE(I16x8MaxS, i16x8, int8, 8, a > b ? a : b)
BINOP_CASE(I16x8MaxU, ui16x8, uint8, 8, a > b ? a : b)
BINOP_CASE(I8x16MaxS, i8x16, int16, 16, a > b ? a : b)
BINOP_CASE(I8x16MaxU, ui8x16, uint16, 16, a > b ? a : b)
BINOP_CASE(
I32x4MaxU, i32x4, int4, 4,
*reinterpret_cast<uint32_t*>(&a) > *reinterpret_cast<uint32_t*>(&b)
? a
: b)
BINOP_CASE(S128And, i32x4, int4, 4, a & b)
BINOP_CASE(S128Or, i32x4, int4, 4, a | b)
BINOP_CASE(S128Xor, i32x4, int4, 4, a ^ b)
BINOP_CASE(I16x8Add, i16x8, int8, 8, a + b)
BINOP_CASE(I16x8Sub, i16x8, int8, 8, a - b)
BINOP_CASE(I16x8Mul, i16x8, int8, 8, a * b)
BINOP_CASE(I16x8MinS, i16x8, int8, 8, a < b ? a : b)
BINOP_CASE(
I16x8MinU, i16x8, int8, 8,
*reinterpret_cast<uint16_t*>(&a) < *reinterpret_cast<uint16_t*>(&b)
? a
: b)
BINOP_CASE(I16x8MaxS, i16x8, int8, 8, a > b ? a : b)
BINOP_CASE(
I16x8MaxU, i16x8, int8, 8,
*reinterpret_cast<uint16_t*>(&a) > *reinterpret_cast<uint16_t*>(&b)
? a
: b)
BINOP_CASE(I16x8AddSaturateS, i16x8, int8, 8, SaturateAdd<int16_t>(a, b))
BINOP_CASE(I16x8AddSaturateU, ui16x8, uint8, 8,
SaturateAdd<uint16_t>(a, b))
BINOP_CASE(I16x8AddSaturateU, i16x8, int8, 8, SaturateAdd<uint16_t>(a, b))
BINOP_CASE(I16x8SubSaturateS, i16x8, int8, 8, SaturateSub<int16_t>(a, b))
BINOP_CASE(I16x8SubSaturateU, ui16x8, uint8, 8,
SaturateSub<uint16_t>(a, b))
BINOP_CASE(I16x8SubSaturateU, i16x8, int8, 8, SaturateSub<uint16_t>(a, b))
BINOP_CASE(I8x16Add, i8x16, int16, 16, a + b)
BINOP_CASE(I8x16Sub, i8x16, int16, 16, a - b)
BINOP_CASE(I8x16Mul, i8x16, int16, 16, a * b)
BINOP_CASE(I8x16MinS, i8x16, int16, 16, a < b ? a : b)
BINOP_CASE(
I8x16MinU, i8x16, int16, 16,
*reinterpret_cast<uint8_t*>(&a) < *reinterpret_cast<uint8_t*>(&b) ? a
: b)
BINOP_CASE(I8x16MaxS, i8x16, int16, 16, a > b ? a : b)
BINOP_CASE(
I8x16MaxU, i8x16, int16, 16,
*reinterpret_cast<uint8_t*>(&a) > *reinterpret_cast<uint8_t*>(&b) ? a
: b)
BINOP_CASE(I8x16AddSaturateS, i8x16, int16, 16, SaturateAdd<int8_t>(a, b))
BINOP_CASE(I8x16AddSaturateU, ui8x16, uint16, 16,
BINOP_CASE(I8x16AddSaturateU, i8x16, int16, 16,
SaturateAdd<uint8_t>(a, b))
BINOP_CASE(I8x16SubSaturateS, i8x16, int16, 16, SaturateSub<int8_t>(a, b))
BINOP_CASE(I8x16SubSaturateU, ui8x16, uint16, 16,
BINOP_CASE(I8x16SubSaturateU, i8x16, int16, 16,
SaturateSub<uint8_t>(a, b))
#undef BINOP_CASE
#define UNOP_CASE(op, name, stype, count, expr) \
......@@ -1724,12 +1744,12 @@ class ThreadImpl {
}
UNOP_CASE(F32x4Abs, f32x4, float4, 4, std::abs(a))
UNOP_CASE(F32x4Neg, f32x4, float4, 4, -a)
UNOP_CASE(I32x4Neg, i32x4, int4, 4, -a)
UNOP_CASE(I16x8Neg, i16x8, int8, 8, -a)
UNOP_CASE(I8x16Neg, i8x16, int16, 16, -a)
UNOP_CASE(F32x4RecipApprox, f32x4, float4, 4, 1.0f / a)
UNOP_CASE(F32x4RecipSqrtApprox, f32x4, float4, 4, 1.0f / std::sqrt(a))
UNOP_CASE(I32x4Neg, i32x4, int4, 4, -a)
UNOP_CASE(S128Not, i32x4, int4, 4, ~a)
UNOP_CASE(I16x8Neg, i16x8, int8, 8, -a)
UNOP_CASE(I8x16Neg, i8x16, int16, 16, -a)
#undef UNOP_CASE
default:
return false;
......
......@@ -14,14 +14,11 @@ namespace v8 {
namespace internal {
namespace wasm {
#define FOREACH_SIMD_TYPE(V) \
V(float, float4, f32x4, 4) \
V(int32_t, int4, i32x4, 4) \
V(uint32_t, uint4, ui32x4, 4) \
V(int16_t, int8, i16x8, 8) \
V(uint16_t, uint8, ui16x8, 8) \
V(int8_t, int16, i8x16, 16) \
V(uint8_t, uint16, ui8x16, 16)
#define FOREACH_SIMD_TYPE(V) \
V(float, float4, f32x4, 4) \
V(int32_t, int4, i32x4, 4) \
V(int16_t, int8, i16x8, 8) \
V(int8_t, int16, i8x16, 16)
#define DEFINE_SIMD_TYPE(cType, sType, name, kSize) \
struct sType { \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment