Bug 1046125 - IonMonkey: (ARM) Correct handling of 16 DP float registers for SetElementCache code generation. r=mjrosenb, a=sledru
authorDouglas Crosher <dtc-moz@scieneer.com>
Thu, 31 Jul 2014 22:19:36 +1000
changeset 216214 967ea1f6538069fbe39dc8c4fa648d075885c27b
parent 216213 0b662794f7dcde27ca7cca412e718020d8054a2f
child 216215 5a92e35703c6b65cf241e100ae2a7d15b6685b20
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-beta@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmjrosenb, sledru
bugs1046125
milestone33.0a2
Bug 1046125 - IonMonkey: (ARM) Correct handling of 16 DP float registers for SetElementCache code generation. r=mjrosenb, a=sledru
js/src/jit/IonCaches.cpp
--- a/js/src/jit/IonCaches.cpp
+++ b/js/src/jit/IonCaches.cpp
@@ -3730,20 +3730,21 @@ GenerateSetTypedArrayElement(JSContext *
     masm.loadPtr(Address(object, TypedArrayObject::dataOffset()), elements);
 
     // Set the value.
     Scalar::Type arrayType = tarr->type();
     int width = Scalar::byteSize(arrayType);
     BaseIndex target(elements, index, ScaleFromElemWidth(width));
 
     if (arrayType == Scalar::Float32) {
-        JS_ASSERT(tempFloat32 != InvalidFloatReg);
-        if (!masm.convertConstantOrRegisterToFloat(cx, value, tempFloat32, &failures))
+        JS_ASSERT_IF(hasUnaliasedDouble(), tempFloat32 != InvalidFloatReg);
+        FloatRegister tempFloat = hasUnaliasedDouble() ? tempFloat32 : tempDouble;
+        if (!masm.convertConstantOrRegisterToFloat(cx, value, tempFloat, &failures))
             return false;
-        masm.storeToTypedFloatArray(arrayType, tempFloat32, target);
+        masm.storeToTypedFloatArray(arrayType, tempFloat, target);
     } else if (arrayType == Scalar::Float64) {
         if (!masm.convertConstantOrRegisterToDouble(cx, value, tempDouble, &failures))
             return false;
         masm.storeToTypedFloatArray(arrayType, tempDouble, target);
     } else {
         // On x86 we only have 6 registers available to use, so reuse the object
         // register to compute the intermediate value to store and restore it
         // afterwards.