diff --git a/js/src/jit-test/tests/ion/bug1874502.js b/js/src/jit-test/tests/ion/bug1874502.js new file mode 100644 index 00000000000..347c5467485 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1874502.js @@ -0,0 +1,8 @@ +// |jit-test| --no-threads; --fast-warmup + +function f(x) { + Math.fround(function () { x; }); + } + for (let i = 0; i < 30; i++) { + f(Math.fround(1)); + } \ No newline at end of file diff --git a/js/src/jit/arm/MacroAssembler-arm.cpp b/js/src/jit/arm/MacroAssembler-arm.cpp index da358c5ec9d..fe4f36ab26e 100644 --- a/js/src/jit/arm/MacroAssembler-arm.cpp +++ b/js/src/jit/arm/MacroAssembler-arm.cpp @@ -4592,7 +4592,7 @@ void MacroAssembler::moveValue(const TypedOrValueRegister& src, return; } - ScratchFloat32Scope scratch(*this); + ScratchDoubleScope scratch(*this); FloatRegister freg = reg.fpu(); if (type == MIRType::Float32) { convertFloat32ToDouble(freg, scratch);