Commit 86016622 authored by hablich's avatar hablich Committed by Commit bot

Revert of [simd.js] Update to spec version 0.8.2. (patchset #11 id:200001 of...

Revert of [simd.js] Update to spec version 0.8.2. (patchset #11 id:200001 of https://codereview.chromium.org/1294513004/ )

Reason for revert:
Fails tests:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20deadcode/builds/5073/steps/steps/logs/stdio

Original issue's description:
> [simd.js] Update to spec version 0.8.2.
>
> Adds Uint32x4, Uint16x8, and Uint8x16 types.
> Adds all functions in the current spec, except for loads and stores.
>
> LOG=Y
> BUG=v8:4124
>
> Committed: https://crrev.com/4be6d37fd1ad0a6e0ea37da8863ae5169c2b89ba
> Cr-Commit-Position: refs/heads/master@{#30322}

TBR=littledan@chromium.org,bbudge@google.com,bmeurer@chromium.org,hpayer@chromium.org,bbudge@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4124

Review URL: https://codereview.chromium.org/1309513005

Cr-Commit-Position: refs/heads/master@{#30323}
parent 4be6d37f
......@@ -216,12 +216,9 @@ enum BindingFlags {
V(STRONG_MAP_CACHE_INDEX, Object, strong_map_cache) \
V(SYMBOL_FUNCTION_INDEX, JSFunction, symbol_function) \
V(UINT16_ARRAY_FUN_INDEX, JSFunction, uint16_array_fun) \
V(UINT16X8_FUNCTION_INDEX, JSFunction, uint16x8_function) \
V(UINT32_ARRAY_FUN_INDEX, JSFunction, uint32_array_fun) \
V(UINT32X4_FUNCTION_INDEX, JSFunction, uint32x4_function) \
V(UINT8_ARRAY_FUN_INDEX, JSFunction, uint8_array_fun) \
V(UINT8_CLAMPED_ARRAY_FUN_INDEX, JSFunction, uint8_clamped_array_fun) \
V(UINT8X16_FUNCTION_INDEX, JSFunction, uint8x16_function) \
NATIVE_CONTEXT_IMPORTED_FIELDS(V) \
NATIVE_CONTEXT_IMPORTED_FIELDS_FOR_PROXY(V)
......
This diff is collapsed.
......@@ -46,13 +46,10 @@ namespace internal {
V(Map, mutable_heap_number_map, MutableHeapNumberMap) \
V(Map, float32x4_map, Float32x4Map) \
V(Map, int32x4_map, Int32x4Map) \
V(Map, uint32x4_map, Uint32x4Map) \
V(Map, bool32x4_map, Bool32x4Map) \
V(Map, int16x8_map, Int16x8Map) \
V(Map, uint16x8_map, Uint16x8Map) \
V(Map, bool16x8_map, Bool16x8Map) \
V(Map, int8x16_map, Int8x16Map) \
V(Map, uint8x16_map, Uint8x16Map) \
V(Map, bool8x16_map, Bool8x16Map) \
V(Map, native_context_map, NativeContextMap) \
V(Map, fixed_array_map, FixedArrayMap) \
......@@ -224,20 +221,14 @@ namespace internal {
V(Float32x4_string, "Float32x4") \
V(int32x4_string, "int32x4") \
V(Int32x4_string, "Int32x4") \
V(uint32x4_string, "uint32x4") \
V(Uint32x4_string, "Uint32x4") \
V(bool32x4_string, "bool32x4") \
V(Bool32x4_string, "Bool32x4") \
V(int16x8_string, "int16x8") \
V(Int16x8_string, "Int16x8") \
V(uint16x8_string, "uint16x8") \
V(Uint16x8_string, "Uint16x8") \
V(bool16x8_string, "bool16x8") \
V(Bool16x8_string, "Bool16x8") \
V(int8x16_string, "int8x16") \
V(Int8x16_string, "Int8x16") \
V(uint8x16_string, "uint8x16") \
V(Uint8x16_string, "Uint8x16") \
V(bool8x16_string, "bool8x16") \
V(Bool8x16_string, "Bool8x16") \
V(function_string, "function") \
......@@ -378,13 +369,10 @@ namespace internal {
V(MutableHeapNumberMap) \
V(Float32x4Map) \
V(Int32x4Map) \
V(Uint32x4Map) \
V(Bool32x4Map) \
V(Int16x8Map) \
V(Uint16x8Map) \
V(Bool16x8Map) \
V(Int8x16Map) \
V(Uint8x16Map) \
V(Bool8x16Map) \
V(NativeContextMap) \
V(FixedArrayMap) \
......
......@@ -48,16 +48,6 @@ var StringCharAt;
var StringIndexOf;
var StringSubstring;
var ToString;
var Float32x4ToString;
var Int32x4ToString;
var Uint32x4ToString;
var Bool32x4ToString;
var Int16x8ToString;
var Uint16x8ToString;
var Bool16x8ToString;
var Int8x16ToString;
var Uint8x16ToString;
var Bool8x16ToString;
utils.Import(function(from) {
ArrayJoin = from.ArrayJoin;
......@@ -74,16 +64,6 @@ utils.Import(function(from) {
StringCharAt = from.StringCharAt;
StringIndexOf = from.StringIndexOf;
StringSubstring = from.StringSubstring;
Float32x4ToString = from.Float32x4ToString;
Int32x4ToString = from.Int32x4ToString;
Uint32x4ToString = from.Uint32x4ToString;
Bool32x4ToString = from.Bool32x4ToString;
Int16x8ToString = from.Int16x8ToString;
Uint16x8ToString = from.Uint16x8ToString;
Bool16x8ToString = from.Bool16x8ToString;
Int8x16ToString = from.Int8x16ToString;
Uint8x16ToString = from.Uint8x16ToString;
Bool8x16ToString = from.Bool8x16ToString;
});
utils.ImportNow(function(from) {
......@@ -127,14 +107,11 @@ function NoSideEffectToString(obj) {
switch (typeof(obj)) {
case 'float32x4': return %_CallFunction(obj, Float32x4ToString);
case 'int32x4': return %_CallFunction(obj, Int32x4ToString);
case 'uint32x4': return %_CallFunction(obj, Uint32x4ToString);
case 'bool32x4': return %_CallFunction(obj, Bool32x4ToString);
case 'int16x8': return %_CallFunction(obj, Int16x8ToString);
case 'uint16x8': return %_CallFunction(obj, Uint16x8ToString);
case 'bool16x8': return %_CallFunction(obj, Bool16x8ToString);
case 'int8x16': return %_CallFunction(obj, Int8x16ToString);
case 'uint8x16': return %_CallFunction(obj, Uint8x16ToString);
case 'bool8x16': return %_CallFunction(obj, Bool8x16ToString);
case 'int16x8': return %_CallFunction(obj, Int16x8ToString);
case 'bool16x8': return %_CallFunction(obj, Bool16x8ToString);
}
}
if (IS_OBJECT(obj)
......
......@@ -1591,11 +1591,8 @@ SIMD128_TYPES(SIMD128_VALUE_EQUALS)
SIMD128_NUMERIC_LANE_FNS(Float32x4, float, 4, FLOAT, kFloatSize)
SIMD128_NUMERIC_LANE_FNS(Int32x4, int32_t, 4, INT32, kInt32Size)
SIMD128_NUMERIC_LANE_FNS(Uint32x4, uint32_t, 4, UINT32, kInt32Size)
SIMD128_NUMERIC_LANE_FNS(Int16x8, int16_t, 8, INT16, kShortSize)
SIMD128_NUMERIC_LANE_FNS(Uint16x8, uint16_t, 8, UINT16, kShortSize)
SIMD128_NUMERIC_LANE_FNS(Int8x16, int8_t, 16, INT8, kCharSize)
SIMD128_NUMERIC_LANE_FNS(Uint8x16, uint8_t, 16, UINT8, kCharSize)
#undef SIMD128_NUMERIC_LANE_FNS
......@@ -3330,9 +3327,6 @@ CAST_ACCESSOR(String)
CAST_ACCESSOR(StringTable)
CAST_ACCESSOR(Struct)
CAST_ACCESSOR(Symbol)
CAST_ACCESSOR(Uint16x8)
CAST_ACCESSOR(Uint32x4)
CAST_ACCESSOR(Uint8x16)
CAST_ACCESSOR(UnseededNumberDictionary)
CAST_ACCESSOR(WeakCell)
CAST_ACCESSOR(WeakFixedArray)
......
......@@ -221,11 +221,8 @@ void Float32x4::Float32x4Print(std::ostream& os) { // NOLINT
} \
}
SIMD128_INT_PRINT_FUNCTION(Int32x4, 4)
SIMD128_INT_PRINT_FUNCTION(Uint32x4, 4)
SIMD128_INT_PRINT_FUNCTION(Int16x8, 8)
SIMD128_INT_PRINT_FUNCTION(Uint16x8, 8)
SIMD128_INT_PRINT_FUNCTION(Int8x16, 16)
SIMD128_INT_PRINT_FUNCTION(Uint8x16, 16)
#undef SIMD128_INT_PRINT_FUNCTION
......
......@@ -115,13 +115,10 @@
// - Simd128Value
// - Float32x4
// - Int32x4
// - Uint32x4
// - Bool32x4
// - Int16x8
// - Uint16x8
// - Bool16x8
// - Int8x16
// - Uint8x16
// - Bool8x16
// - Cell
// - PropertyCell
......@@ -869,13 +866,10 @@ template <class C> inline bool Is(Object* obj);
V(Simd128Value) \
V(Float32x4) \
V(Int32x4) \
V(Uint32x4) \
V(Bool32x4) \
V(Int16x8) \
V(Uint16x8) \
V(Bool16x8) \
V(Int8x16) \
V(Uint8x16) \
V(Bool8x16) \
V(Name) \
V(UniqueName) \
......@@ -1598,13 +1592,10 @@ class Simd128Value : public HeapObject {
#define SIMD128_TYPES(V) \
V(FLOAT32X4, Float32x4, float32x4, 4, float) \
V(INT32X4, Int32x4, int32x4, 4, int32_t) \
V(UINT32X4, Uint32x4, uint32x4, 4, uint32_t) \
V(BOOL32X4, Bool32x4, bool32x4, 4, bool) \
V(INT16X8, Int16x8, int16x8, 8, int16_t) \
V(UINT16X8, Uint16x8, uint16x8, 8, uint16_t) \
V(BOOL16X8, Bool16x8, bool16x8, 8, bool) \
V(INT8X16, Int8x16, int8x16, 16, int8_t) \
V(UINT8X16, Uint8x16, uint8x16, 16, uint8_t) \
V(BOOL8X16, Bool8x16, bool8x16, 16, bool)
#define SIMD128_VALUE_CLASS(TYPE, Type, type, lane_count, lane_type) \
......
This diff is collapsed.
This diff is collapsed.
......@@ -503,13 +503,10 @@ void CheckSimdSnapshot(const char* program, const char* var_name) {
TEST(HeapSnapshotSimd) {
CheckSimdSnapshot("a = SIMD.Float32x4();\n", "a");
CheckSimdSnapshot("a = SIMD.Int32x4();\n", "a");
CheckSimdSnapshot("a = SIMD.Uint32x4();\n", "a");
CheckSimdSnapshot("a = SIMD.Bool32x4();\n", "a");
CheckSimdSnapshot("a = SIMD.Int16x8();\n", "a");
CheckSimdSnapshot("a = SIMD.Uint16x8();\n", "a");
CheckSimdSnapshot("a = SIMD.Bool16x8();\n", "a");
CheckSimdSnapshot("a = SIMD.Int8x16();\n", "a");
CheckSimdSnapshot("a = SIMD.Uint8x16();\n", "a");
CheckSimdSnapshot("a = SIMD.Bool8x16();\n", "a");
}
......
......@@ -288,7 +288,7 @@ TEST(SimdObjects) {
}
// Int32x4
{
int32_t lanes[4] = {1, 2, 3, 4};
int32_t lanes[4] = {-1, 0, 1, 2};
Handle<Int32x4> value = factory->NewInt32x4(lanes);
CHECK(value->IsInt32x4());
......@@ -297,26 +297,12 @@ TEST(SimdObjects) {
#ifdef OBJECT_PRINT
std::ostringstream os;
value->Int32x4Print(os);
CHECK_EQ("1, 2, 3, 4", os.str());
#endif // OBJECT_PRINT
}
// Uint32x4
{
uint32_t lanes[4] = {1, 2, 3, 4};
Handle<Uint32x4> value = factory->NewUint32x4(lanes);
CHECK(value->IsUint32x4());
CheckSimdValue<Uint32x4, uint32_t, 4>(*value, lanes, 3);
#ifdef OBJECT_PRINT
std::ostringstream os;
value->Uint32x4Print(os);
CHECK_EQ("1, 2, 3, 4", os.str());
CHECK_EQ("-1, 0, 1, 2", os.str());
#endif // OBJECT_PRINT
}
// Bool32x4
{
bool lanes[4] = {true, false, true, false};
bool lanes[4] = {true, true, true, false};
Handle<Bool32x4> value = factory->NewBool32x4(lanes);
CHECK(value->IsBool32x4());
......@@ -325,12 +311,12 @@ TEST(SimdObjects) {
#ifdef OBJECT_PRINT
std::ostringstream os;
value->Bool32x4Print(os);
CHECK_EQ("true, false, true, false", os.str());
CHECK_EQ("true, true, true, false", os.str());
#endif // OBJECT_PRINT
}
// Int16x8
{
int16_t lanes[8] = {1, 2, 3, 4, 5, 6, 7, 8};
int16_t lanes[8] = {-1, 0, 1, 2, 3, 4, 5, -32768};
Handle<Int16x8> value = factory->NewInt16x8(lanes);
CHECK(value->IsInt16x8());
......@@ -339,26 +325,12 @@ TEST(SimdObjects) {
#ifdef OBJECT_PRINT
std::ostringstream os;
value->Int16x8Print(os);
CHECK_EQ("1, 2, 3, 4, 5, 6, 7, 8", os.str());
#endif // OBJECT_PRINT
}
// Uint16x8
{
uint16_t lanes[8] = {1, 2, 3, 4, 5, 6, 7, 8};
Handle<Uint16x8> value = factory->NewUint16x8(lanes);
CHECK(value->IsUint16x8());
CheckSimdValue<Uint16x8, uint16_t, 8>(*value, lanes, 32767);
#ifdef OBJECT_PRINT
std::ostringstream os;
value->Uint16x8Print(os);
CHECK_EQ("1, 2, 3, 4, 5, 6, 7, 8", os.str());
CHECK_EQ("-1, 0, 1, 2, 3, 4, 5, -32768", os.str());
#endif // OBJECT_PRINT
}
// Bool16x8
{
bool lanes[8] = {true, false, true, false, true, false, true, false};
bool lanes[8] = {true, true, true, true, true, true, true, false};
Handle<Bool16x8> value = factory->NewBool16x8(lanes);
CHECK(value->IsBool16x8());
......@@ -367,12 +339,12 @@ TEST(SimdObjects) {
#ifdef OBJECT_PRINT
std::ostringstream os;
value->Bool16x8Print(os);
CHECK_EQ("true, false, true, false, true, false, true, false", os.str());
CHECK_EQ("true, true, true, true, true, true, true, false", os.str());
#endif // OBJECT_PRINT
}
// Int8x16
{
int8_t lanes[16] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
int8_t lanes[16] = {-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, -128};
Handle<Int8x16> value = factory->NewInt8x16(lanes);
CHECK(value->IsInt8x16());
......@@ -381,27 +353,14 @@ TEST(SimdObjects) {
#ifdef OBJECT_PRINT
std::ostringstream os;
value->Int8x16Print(os);
CHECK_EQ("1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16", os.str());
#endif // OBJECT_PRINT
}
// Uint8x16
{
uint8_t lanes[16] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
Handle<Uint8x16> value = factory->NewUint8x16(lanes);
CHECK(value->IsUint8x16());
CheckSimdValue<Uint8x16, uint8_t, 16>(*value, lanes, 127);
#ifdef OBJECT_PRINT
std::ostringstream os;
value->Uint8x16Print(os);
CHECK_EQ("1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16", os.str());
CHECK_EQ("-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, -128",
os.str());
#endif // OBJECT_PRINT
}
// Bool8x16
{
bool lanes[16] = {true, false, true, false, true, false, true, false,
true, false, true, false, true, false, true, false};
bool lanes[16] = {true, true, true, true, true, true, true, false,
true, true, true, true, true, true, true, false};
Handle<Bool8x16> value = factory->NewBool8x16(lanes);
CHECK(value->IsBool8x16());
......@@ -411,8 +370,8 @@ TEST(SimdObjects) {
std::ostringstream os;
value->Bool8x16Print(os);
CHECK_EQ(
"true, false, true, false, true, false, true, false, true, false, "
"true, false, true, false, true, false",
"true, true, true, true, true, true, true, false, true, true, true, "
"true, true, true, true, false",
os.str());
#endif // OBJECT_PRINT
}
......
......@@ -109,12 +109,9 @@ TEST(SimdTypes) {
FLOAT_TEST(Float32x4, 4)
INT_TEST(Int32x4, 4, int32_t)
INT_TEST(Uint32x4, 4, uint32_t)
BOOL_TEST(Bool32x4, 4)
INT_TEST(Int16x8, 8, int16_t)
INT_TEST(Uint16x8, 8, uint16_t)
BOOL_TEST(Bool16x8, 8)
INT_TEST(Int8x16, 16, int8_t)
INT_TEST(Uint8x16, 16, uint8_t)
BOOL_TEST(Bool8x16, 16)
}
......@@ -45,9 +45,9 @@ function isValidSimdString(string, value, type, lanes) {
}
var simdTypeNames = ['Float32x4', 'Int32x4', 'Uint32x4', 'Bool32x4',
'Int16x8', 'Uint16x8', 'Bool16x8',
'Int8x16', 'Uint8x16', 'Bool8x16'];
var simdTypeNames = ['Float32x4', 'Int32x4', 'Bool32x4',
'Int16x8', 'Bool16x8',
'Int8x16', 'Bool8x16'];
var nonSimdValues = [347, 1.275, NaN, "string", null, undefined, {},
function() {}];
......@@ -212,24 +212,6 @@ function TestCoercions(type, lanes) {
test(4294967296, 0);
test(4294967297, 1);
break;
case 'Uint32x4':
test(Infinity, 0);
test(-Infinity, 0);
test(NaN, 0);
test(0, 0);
test(-0, 0);
test(Number.MIN_VALUE, 0);
test(-Number.MIN_VALUE, 0);
test(0.1, 0);
test(-0.1, 0);
test(1, 1);
test(1.1, 1);
test(-1, 4294967295);
test(-1.6, 4294967295);
test(4294967295, 4294967295);
test(4294967296, 0);
test(4294967297, 1);
break;
case 'Int16x8':
test(Infinity, 0);
test(-Infinity, 0);
......@@ -251,24 +233,6 @@ function TestCoercions(type, lanes) {
test(65536, 0);
test(65537, 1);
break;
case 'Uint16x8':
test(Infinity, 0);
test(-Infinity, 0);
test(NaN, 0);
test(0, 0);
test(-0, 0);
test(Number.MIN_VALUE, 0);
test(-Number.MIN_VALUE, 0);
test(0.1, 0);
test(-0.1, 0);
test(1, 1);
test(1.1, 1);
test(-1, 65535);
test(-1.6, 65535);
test(65535, 65535);
test(65536, 0);
test(65537, 1);
break;
case 'Int8x16':
test(Infinity, 0);
test(-Infinity, 0);
......@@ -290,24 +254,6 @@ function TestCoercions(type, lanes) {
test(256, 0);
test(257, 1);
break;
case 'Uint8x16':
test(Infinity, 0);
test(-Infinity, 0);
test(NaN, 0);
test(0, 0);
test(-0, 0);
test(Number.MIN_VALUE, 0);
test(-Number.MIN_VALUE, 0);
test(0.1, 0);
test(-0.1, 0);
test(1, 1);
test(1.1, 1);
test(-1, 255);
test(-1.6, 255);
test(255, 255);
test(256, 0);
test(257, 1);
break;
case 'Bool32x4':
case 'Bool16x8':
case 'Bool8x16':
......@@ -384,11 +330,8 @@ function TestEquality(type, lanes) {
test(NaN, NaN);
break;
case 'Int32x4':
case 'Uint32x4':
case 'Int16x8':
case 'Uint16x8':
case 'Int8x16':
case 'Uint8x16':
test(1, 2);
test(1, 1);
test(1, -1);
......@@ -438,11 +381,8 @@ function TestSameValue(type, lanes) {
test(NaN, NaN);
break;
case 'Int32x4':
case 'Uint32x4':
case 'Int16x8':
case 'Uint16x8':
case 'Int8x16':
case 'Uint8x16':
test(1, 2);
test(1, 1);
test(1, -1);
......
......@@ -14,8 +14,8 @@ from testrunner.local import testsuite
from testrunner.local import utils
from testrunner.objects import testcase
SIMDJS_ARCHIVE_REVISION = "0fecaab13e57e9be50d87e3fa49b2729838bb75c"
SIMDJS_ARCHIVE_MD5 = "ce25acf841b76624607b39252122bb0e"
SIMDJS_ARCHIVE_REVISION = "99ef44bd4f22acd203c01e524131bc7f2a7eab68"
SIMDJS_ARCHIVE_MD5 = "1428773887924fa5a784bf0843615740"
SIMDJS_URL = ("https://github.com/tc39/ecmascript_simd/archive/%s.tar.gz")
SIMDJS_SUITE_PATH = ["data", "src"]
......@@ -44,7 +44,7 @@ class SimdJsTestSuite(testsuite.TestSuite):
def GetFlagsForTestCase(self, testcase, context):
return (testcase.flags + context.mode_flags +
[os.path.join(self.root, "harness-adapt.js"),
"--harmony --harmony-simd",
"--harmony",
os.path.join(self.testroot, testcase.path + ".js"),
os.path.join(self.root, "harness-finish.js")])
......
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