mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 827965 - Utilize GetTempRegForIntArg() for callNative calls. (r=sstangl)
This commit is contained in:
parent
2ebd075cca
commit
d4488d3043
@ -300,9 +300,20 @@ LIRGenerator::visitCall(MCall *call)
|
||||
// Call known functions.
|
||||
if (target) {
|
||||
if (target->isNative()) {
|
||||
LCallNative *lir = new LCallNative(argslot, tempFixed(CallTempReg0),
|
||||
tempFixed(CallTempReg1), tempFixed(CallTempReg2),
|
||||
tempFixed(CallTempReg3));
|
||||
Register cxReg, numReg, vpReg, tmpReg;
|
||||
GetTempRegForIntArg(0, 0, &cxReg);
|
||||
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));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user