Commit 444a9339 authored by paul.lind's avatar paul.lind Committed by Commit bot

MIPS: Fix MacroAssembler::AssertFunction()

Porting mistake in ccbb4ff0 '[builtins] Unify the various versions of [[Call]]
with a Call builtin.', which only showed as debug assertion in later commit
db2ba190 '[runtime] Replace many buggy uses of %_CallFunction with %_Call.'

Use temporary register rather than push/pop of 'object' register.

BUG=
TEST=cctest/test-api/SetFunctionEntryHook, cctest/test-serialize/PerIsolateSnapshotBlobs, ...

Review URL: https://codereview.chromium.org/1309163006

Cr-Commit-Position: refs/heads/master@{#30643}
parent 0faceaec
......@@ -5180,10 +5180,8 @@ void MacroAssembler::AssertFunction(Register object) {
STATIC_ASSERT(kSmiTag == 0);
SmiTst(object, t0);
Check(ne, kOperandIsASmiAndNotAFunction, t0, Operand(zero_reg));
push(object);
GetObjectType(object, object, object);
pop(object);
Check(eq, kOperandIsNotAFunction, object, Operand(JS_FUNCTION_TYPE));
GetObjectType(object, t0, t0);
Check(eq, kOperandIsNotAFunction, t0, Operand(JS_FUNCTION_TYPE));
}
}
......
......@@ -5378,10 +5378,8 @@ void MacroAssembler::AssertFunction(Register object) {
STATIC_ASSERT(kSmiTag == 0);
SmiTst(object, t0);
Check(ne, kOperandIsASmiAndNotAFunction, t0, Operand(zero_reg));
push(object);
GetObjectType(object, object, object);
pop(object);
Check(eq, kOperandIsNotAFunction, object, Operand(JS_FUNCTION_TYPE));
GetObjectType(object, t0, t0);
Check(eq, kOperandIsNotAFunction, t0, Operand(JS_FUNCTION_TYPE));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment