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}
This commit is contained in:
paul.lind 2015-09-08 12:29:22 -07:00 committed by Commit bot
parent 0faceaec7f
commit 444a933931
2 changed files with 4 additions and 8 deletions

View File

@ -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));
}
}

View File

@ -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));
}
}