diff --git a/js/src/nanojit/NativeX64.cpp b/js/src/nanojit/NativeX64.cpp index 3ee96436d14..8b98cd58559 100644 --- a/js/src/nanojit/NativeX64.cpp +++ b/js/src/nanojit/NativeX64.cpp @@ -317,7 +317,7 @@ namespace nanojit rr = prepResultReg(ins, allow); // if this is last use of a in reg, we can re-use result reg if (a->isUnusedOrHasUnknownReg()) { - ra = findSpecificRegFor(a, rr); + ra = findSpecificRegForUnallocated(a, rr); } else if (!(allow & rmask(a->getReg()))) { // 'a' already has a register assigned, but it's not valid. // To make sure floating point operations stay in FPU registers @@ -471,7 +471,7 @@ namespace nanojit Register rhsReg = findRegFor(rhs, (GpRegs ^ (rmask(RAX)|rmask(RDX)))); Register lhsReg = lhs->isUnusedOrHasUnknownReg() - ? findSpecificRegFor(lhs, RAX) + ? findSpecificRegForUnallocated(lhs, RAX) : lhs->getReg(); emitr(X64_idiv, rhsReg); emit8(rexrb(X64_sari | uint64_t(RDX&7)<<48, (Register)0, RDX), 31); @@ -1207,7 +1207,7 @@ namespace nanojit rr = prepResultReg(ins, allow); // if this is last use of a in reg, we can re-use result reg if (a->isUnusedOrHasUnknownReg()) { - ra = findSpecificRegFor(a, rr); + ra = findSpecificRegForUnallocated(a, rr); } else { // 'a' already has a register assigned. Caller must emit a copy // to rr once instr code is generated. (ie mov rr,ra ; op rr) diff --git a/js/src/nanojit/Nativei386.cpp b/js/src/nanojit/Nativei386.cpp index 4af74273c38..face0abedae 100644 --- a/js/src/nanojit/Nativei386.cpp +++ b/js/src/nanojit/Nativei386.cpp @@ -1747,7 +1747,7 @@ namespace nanojit // compare two different numbers int d = findMemFor(rhs); int pop = lhs->isUnusedOrHasUnknownReg(); - findSpecificRegForUnallocated(lhs, FST0); + findSpecificRegFor(lhs, FST0); // lhs is in ST(0) and rhs is on stack FCOM(pop, d, FP); } @@ -1755,7 +1755,7 @@ namespace nanojit { // compare n to itself, this is a NaN test. int pop = lhs->isUnusedOrHasUnknownReg(); - findSpecificRegForUnallocated(lhs, FST0); + findSpecificRegFor(lhs, FST0); // value in ST(0) if (pop) FCOMPP();