Skip to content

Commit

Permalink
Bug 1874502: Use ScratchDoubleScope in moveValue. r=jandem, a=RyanVM
Browse files Browse the repository at this point in the history
  • Loading branch information
Ponchale committed Feb 28, 2024
1 parent 937d938 commit 1575b6b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions js/src/jit-test/tests/ion/bug1874502.js
Original file line number Diff line number Diff line change
@@ -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));
}
2 changes: 1 addition & 1 deletion js/src/jit/arm/MacroAssembler-arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1575b6b

Please sign in to comment.