Bug 993034: SIMD - Replace and simplify bogus pointer in Int32x4Select; r=nmatsakis
authorBenjamin Bouvier <benj@benj.me>
Wed, 16 Apr 2014 16:21:24 +0200
changeset 179222 6b1f10cb214adcd31c66c689cc178d9e631c8938
parent 179221 810593c399531541c8f66376d2195db0fbe5ac1c
child 179223 87e9fc86154e1e3cd5dbb461578db02c842af3d2
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersnmatsakis
bugs993034
milestone31.0a1
Bug 993034: SIMD - Replace and simplify bogus pointer in Int32x4Select; r=nmatsakis
js/src/builtin/SIMD.cpp
--- a/js/src/builtin/SIMD.cpp
+++ b/js/src/builtin/SIMD.cpp
@@ -862,19 +862,18 @@ Int32x4Select(JSContext *cx, unsigned ar
     int32_t fr[Int32x4::lanes];
     for (int32_t i = 0; i < Int32x4::lanes; i++)
         fr[i] = And<int32_t, Int32x4>::apply(Not<int32_t, Int32x4>::apply(val[i], 0), fv[i]);
 
     int32_t orInt[Int32x4::lanes];
     for (int32_t i = 0; i < Int32x4::lanes; i++)
         orInt[i] = Or<int32_t, Int32x4>::apply(tr[i], fr[i]);
 
-    float *result[Float32x4::lanes];
-    *result = reinterpret_cast<float *>(&orInt);
-    RootedObject obj(cx, Create<Float32x4>(cx, *result));
+    float *result = reinterpret_cast<float *>(orInt);
+    RootedObject obj(cx, Create<Float32x4>(cx, result));
     if (!obj)
         return false;
 
     args.rval().setObject(*obj);
     return true;
 }
 
 #define DEFINE_SIMD_FLOAT32X4_FUNCTION(Name, Func, Operands, Flags, MIRId)     \