Bug 1534492 - Prevent RegAlloc from allocating an argument register for a temp used in passAbiArg base operand. r=sstangl
☠☠ backed out by 0a10d3faab9e ☠ ☠
authorNicolas B. Pierron <nicolas.b.pierron@nbp.name>
Wed, 03 Apr 2019 16:46:48 +0000
changeset 467976 1778699fa005874daead175293e374af9c7a092d
parent 467975 895863144707dd9216fcb26807a22217a5e3eda1
child 467977 1db2227119d0d7784485d489ec680c20e3f24600
push id112667
push useraiakab@mozilla.com
push dateThu, 04 Apr 2019 16:12:45 +0000
treeherdermozilla-inbound@230bb363f2f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssstangl
bugs1534492
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1534492 - Prevent RegAlloc from allocating an argument register for a temp used in passAbiArg base operand. r=sstangl Differential Revision: https://phabricator.services.mozilla.com/D25944
js/src/jit-test/tests/ion/sincos-abi-args-bug1534492.js
js/src/jit/Lowering.cpp
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/ion/sincos-abi-args-bug1534492.js
@@ -0,0 +1,6 @@
+x = [0];
+for (let i = 0; i < 1; ++i) {
+    try {
+        Math.cos(x[0])(Math.sin(x[0]));
+    } catch (e) {}
+}
--- a/js/src/jit/Lowering.cpp
+++ b/js/src/jit/Lowering.cpp
@@ -3404,17 +3404,18 @@ void LIRGenerator::visitArrayJoin(MArray
 
 void LIRGenerator::visitSinCos(MSinCos* ins) {
   MOZ_ASSERT(ins->type() == MIRType::SinCosDouble);
   MOZ_ASSERT(ins->input()->type() == MIRType::Double ||
              ins->input()->type() == MIRType::Float32 ||
              ins->input()->type() == MIRType::Int32);
 
   LSinCos* lir = new (alloc()) LSinCos(useRegisterAtStart(ins->input()),
-                                       tempFixed(CallTempReg0), temp());
+                                       tempFixed(CallTempNonArgRegs[0]),
+                                       tempFixed(CallTempNonArgRegs[1]));
   defineSinCos(lir, ins);
 }
 
 void LIRGenerator::visitStringSplit(MStringSplit* ins) {
   MOZ_ASSERT(ins->type() == MIRType::Object);
   MOZ_ASSERT(ins->string()->type() == MIRType::String);
   MOZ_ASSERT(ins->separator()->type() == MIRType::String);