зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1241872: Fix inlining of SIMD extractLanes in self-hosting; r=jolesen
--HG-- extra : rebase_source : b4f182dc7ef7ee4288965d130ea7d3cf5dba6def
This commit is contained in:
Родитель
51f0851bc2
Коммит
5f14071eeb
|
@ -221,6 +221,9 @@ static const JSFunctionSpec SimdTypedObjectMethods[] = {
|
|||
//
|
||||
// The JS_INLINABLE_FN macro refers to js::JitInfo_##native which we provide as
|
||||
// Simd##Type##_##Operation
|
||||
//
|
||||
// /!\ Don't forget to keep this list in sync with the SIMD instrinics used in
|
||||
// SelfHosting.cpp.
|
||||
|
||||
namespace js {
|
||||
namespace jit {
|
||||
|
|
|
@ -1020,6 +1020,16 @@ bool IsVectorObject(HandleValue v);
|
|||
template<typename V>
|
||||
bool ToSimdConstant(JSContext* cx, HandleValue v, jit::SimdConstant* out);
|
||||
|
||||
JSObject*
|
||||
InitSimdClass(JSContext* cx, HandleObject obj);
|
||||
|
||||
namespace jit {
|
||||
|
||||
extern const JSJitInfo JitInfo_SimdInt32x4_extractLane;
|
||||
extern const JSJitInfo JitInfo_SimdFloat32x4_extractLane;
|
||||
|
||||
} // namespace jit
|
||||
|
||||
#define DECLARE_SIMD_FLOAT32X4_FUNCTION(Name, Func, Operands) \
|
||||
extern bool \
|
||||
simd_float32x4_##Name(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
@ -1092,9 +1102,6 @@ simd_bool64x2_##Name(JSContext* cx, unsigned argc, Value* vp);
|
|||
BOOL64X2_FUNCTION_LIST(DECLARE_SIMD_BOOL64x2_FUNCTION)
|
||||
#undef DECLARE_SIMD_BOOL64x2_FUNCTION
|
||||
|
||||
JSObject*
|
||||
InitSimdClass(JSContext* cx, HandleObject obj);
|
||||
|
||||
} /* namespace js */
|
||||
|
||||
#endif /* builtin_SIMD_h */
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
if (typeof SIMD !== 'object')
|
||||
exit(0);
|
||||
|
||||
function test() {
|
||||
return SIMD.Float32x4().toSource();
|
||||
}
|
||||
|
||||
var r = '';
|
||||
for (var i = 0; i < 10000; i++)
|
||||
r = test();
|
|
@ -1652,11 +1652,11 @@ static const JSFunctionSpec intrinsic_functions[] = {
|
|||
|
||||
JS_FN("std_SIMD_Int8x16_extractLane", simd_int8x16_extractLane, 2,0),
|
||||
JS_FN("std_SIMD_Int16x8_extractLane", simd_int16x8_extractLane, 2,0),
|
||||
JS_INLINABLE_FN("std_SIMD_Int32x4_extractLane", simd_int32x4_extractLane, 2,0, SimdInt32x4),
|
||||
JS_INLINABLE_FN("std_SIMD_Int32x4_extractLane", simd_int32x4_extractLane, 2,0, SimdInt32x4_extractLane),
|
||||
JS_FN("std_SIMD_Uint8x16_extractLane", simd_uint8x16_extractLane, 2,0),
|
||||
JS_FN("std_SIMD_Uint16x8_extractLane", simd_uint16x8_extractLane, 2,0),
|
||||
JS_FN("std_SIMD_Uint32x4_extractLane", simd_uint32x4_extractLane, 2,0),
|
||||
JS_INLINABLE_FN("std_SIMD_Float32x4_extractLane", simd_float32x4_extractLane,2,0, SimdFloat32x4),
|
||||
JS_INLINABLE_FN("std_SIMD_Float32x4_extractLane", simd_float32x4_extractLane,2,0, SimdFloat32x4_extractLane),
|
||||
JS_FN("std_SIMD_Float64x2_extractLane", simd_float64x2_extractLane, 2,0),
|
||||
JS_FN("std_SIMD_Bool8x16_extractLane", simd_bool8x16_extractLane, 2,0),
|
||||
JS_FN("std_SIMD_Bool16x8_extractLane", simd_bool16x8_extractLane, 2,0),
|
||||
|
|
Загрузка…
Ссылка в новой задаче