diff --git a/src/objects.h b/src/objects.h index 549f6ff783d..3da1a6b3502 100644 --- a/src/objects.h +++ b/src/objects.h @@ -6836,10 +6836,12 @@ class Script: public Struct { V(SIMD.int32x4, greaterThan, Int32x4GreaterThan, Int32x4, Int32x4, Int32x4) \ V(SIMD.int32x4, equal, Int32x4Equal, Int32x4, Int32x4, Int32x4) \ V(SIMD.int32x4, lessThan, Int32x4LessThan, Int32x4, Int32x4, Int32x4) \ - V(SIMD.int32x4, shiftLeft, Int32x4ShiftLeft, Int32x4, Int32x4, Integer32) \ - V(SIMD.int32x4, shiftRight, Int32x4ShiftRight, Int32x4, Int32x4, Integer32) \ - V(SIMD.int32x4, shiftRightArithmetic, Int32x4ShiftRightArithmetic, Int32x4, \ - Int32x4, Integer32) + V(SIMD.int32x4, shiftLeftByScalar, Int32x4ShiftLeft, Int32x4, Int32x4, \ + Integer32) \ + V(SIMD.int32x4, shiftRightLogicalByScalar, Int32x4ShiftRight, Int32x4, \ + Int32x4, Integer32) \ + V(SIMD.int32x4, shiftRightArithmeticByScalar, Int32x4ShiftRightArithmetic, \ + Int32x4, Int32x4, Integer32) #define SIMD_TERNARY_OPERATIONS(V) \ V(SIMD.float32x4, clamp, Float32x4Clamp, Float32x4, Float32x4, Float32x4, \ diff --git a/src/simd128.js b/src/simd128.js index 793a23de564..61db6807d2d 100644 --- a/src/simd128.js +++ b/src/simd128.js @@ -465,7 +465,7 @@ function Int32x4SelectJS(x4, trueValue, falseValue) { return %Int32x4Select(x4, trueValue, falseValue); } -function Int32x4ShiftLeftJS(t, s) { +function Int32x4ShiftLeftByScalarJS(t, s) { CheckInt32x4(t); s = TO_NUMBER_INLINE(s); var x = t.x << s; @@ -475,7 +475,7 @@ function Int32x4ShiftLeftJS(t, s) { return %CreateInt32x4(x, y, z, w); } -function Int32x4ShiftRightJS(t, s) { +function Int32x4ShiftRightLogicalByScalarJS(t, s) { CheckInt32x4(t); s = TO_NUMBER_INLINE(s); var x = t.x >>> s; @@ -485,7 +485,7 @@ function Int32x4ShiftRightJS(t, s) { return %CreateInt32x4(x, y, z, w); } -function Int32x4ShiftRightArithmeticJS(t, s) { +function Int32x4ShiftRightArithmeticByScalarJS(t, s) { CheckInt32x4(t); s = TO_NUMBER_INLINE(s); var x = t.x >> s; @@ -618,9 +618,9 @@ function SetUpSIMD() { "greaterThan", Int32x4GreaterThanJS, "equal", Int32x4EqualJS, "lessThan", Int32x4LessThanJS, - "shiftLeft", Int32x4ShiftLeftJS, - "shiftRight", Int32x4ShiftRightJS, - "shiftRightArithmetic", Int32x4ShiftRightArithmeticJS, + "shiftLeftByScalar", Int32x4ShiftLeftByScalarJS, + "shiftRightLogicalByScalar", Int32x4ShiftRightLogicalByScalarJS, + "shiftRightArithmeticByScalar", Int32x4ShiftRightArithmeticByScalarJS, // Ternary "select", Int32x4SelectJS, // Quinary diff --git a/test/mjsunit/simd/int32x4.js b/test/mjsunit/simd/int32x4.js index 8b92392561c..9c3ec7075f3 100644 --- a/test/mjsunit/simd/int32x4.js +++ b/test/mjsunit/simd/int32x4.js @@ -649,13 +649,13 @@ testSIMDComparisons(); function testSIMDShift() { var m = SIMD.int32x4(1, 2, 100, 0); - var a = SIMD.int32x4.shiftLeft(m, 2); + var a = SIMD.int32x4.shiftLeftByScalar(m, 2); assertEquals(4, a.x); assertEquals(8, a.y); assertEquals(400, a.z); assertEquals(0, a.w); - var b = SIMD.int32x4.shiftRight(a, 2); + var b = SIMD.int32x4.shiftRightLogicalByScalar(a, 2); assertEquals(1, b.x); assertEquals(2, b.y); assertEquals(100, b.z); @@ -663,7 +663,7 @@ function testSIMDShift() { var n = SIMD.int32x4(-8, 2, 1, 100); - var c = SIMD.int32x4.shiftRightArithmetic(n, 2); + var c = SIMD.int32x4.shiftRightArithmeticByScalar(n, 2); assertEquals(-2, c.x); assertEquals(0, c.y); assertEquals(0, c.z);