diff --git a/js/src/jit-test/tests/ion/bug1000960.js b/js/src/jit-test/tests/ion/bug1000960.js new file mode 100644 index 000000000000..bf32f844399c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1000960.js @@ -0,0 +1,9 @@ +function testFloat32SetElemIC(a) { + for (var i = 0; i < a.length; i++) { + var r = Math.fround(Number.MAX_VALUE); + a[i] = r; + assertEq(a[i], r); + } +} +testFloat32SetElemIC(new Array(2048)); +testFloat32SetElemIC(new Float32Array(2048)); diff --git a/js/src/jit/arm/MacroAssembler-arm.h b/js/src/jit/arm/MacroAssembler-arm.h index fb924993fa7f..0b0fb11b4aad 100644 --- a/js/src/jit/arm/MacroAssembler-arm.h +++ b/js/src/jit/arm/MacroAssembler-arm.h @@ -1595,7 +1595,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM } void moveFloat32(FloatRegister src, FloatRegister dest) { - as_vmov(VFPRegister(src).singleOverlay(), VFPRegister(dest).singleOverlay()); + as_vmov(VFPRegister(dest).singleOverlay(), VFPRegister(src).singleOverlay()); } #ifdef JSGC_GENERATIONAL