Bug 950277 - Fix checking return values of parallel native calls in Ion. (r=nmatsakis)

This commit is contained in:
Shu-yu Guo 2013-12-17 16:09:01 -08:00
parent 4cad03993d
commit e5ad2f7075

View File

@ -1749,24 +1749,19 @@ CodeGenerator::visitCallNative(LCallNative *call)
switch (executionMode) {
case SequentialExecution:
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, target->native()));
// Test for failure.
masm.branchIfFalseBool(ReturnReg, masm.failureLabel(executionMode));
break;
case ParallelExecution:
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, target->parallelNative()));
// ParallelResult has more nuanced failure, but for now we fail on
// anything that's != TP_SUCCESS.
masm.branch32(Assembler::NotEqual, ReturnReg, Imm32(TP_SUCCESS),
masm.failureLabel(executionMode));
break;
default:
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
// Test for failure.
masm.branchIfFalseBool(ReturnReg, masm.failureLabel(executionMode));
// Load the outparam vp[0] into output register(s).
masm.loadValue(Address(StackPointer, IonNativeExitFrameLayout::offsetOfResult()), JSReturnOperand);