Bug 827965 - Utilize GetTempRegForIntArg() for callNative calls. (r=sstangl)

This commit is contained in:
Eric Faust 2013-01-08 16:50:04 -05:00
Родитель a54f21acb8
Коммит 9b75d7d78b
1 изменённых файлов: 14 добавлений и 3 удалений

Просмотреть файл

@ -300,9 +300,20 @@ LIRGenerator::visitCall(MCall *call)
// Call known functions. // Call known functions.
if (target) { if (target) {
if (target->isNative()) { if (target->isNative()) {
LCallNative *lir = new LCallNative(argslot, tempFixed(CallTempReg0), Register cxReg, numReg, vpReg, tmpReg;
tempFixed(CallTempReg1), tempFixed(CallTempReg2), GetTempRegForIntArg(0, 0, &cxReg);
tempFixed(CallTempReg3)); GetTempRegForIntArg(1, 0, &numReg);
GetTempRegForIntArg(2, 0, &vpReg);
// Even though this is just a temp reg, use the same API to avoid
// register collisions.
mozilla::DebugOnly<bool> ok = GetTempRegForIntArg(3, 0, &tmpReg);
MOZ_ASSERT(ok, "How can we not have four temp registers?");
LCallNative *lir = new LCallNative(argslot, tempFixed(cxReg),
tempFixed(numReg),
tempFixed(vpReg),
tempFixed(tmpReg));
return (defineReturn(lir, call) && assignSafepoint(lir, call)); return (defineReturn(lir, call) && assignSafepoint(lir, call));
} }