Reviewers: Benedikt Meurer, ulan,
Message:
Fix a bad implementation in InstanceofStub (the wrong register was
compared).
Without the fix, the slow case was executed for instanceof(null).
Seems to fix the regression of Octane2/DeltaBlue arose between r24571 and
r24611
for arm64 (side effect?).
Description:
[arm][arm64] fix code for InstanceofStub
[email protected], [email protected]
BUG=
Please review this at https://codereview.chromium.org/657813002/
Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+2, -2 lines):
M src/arm/code-stubs-arm.cc
M src/arm64/code-stubs-arm64.cc
Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index
3ed7b12a37426cd32a558262a662876a1b1136dd..efcc1aefcefb63d31444d9101dee4f5cfc57a00a
100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -1441,7 +1441,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
__ b(ne, &slow);
// Null is not instance of anything.
- __ cmp(scratch, Operand(isolate()->factory()->null_value()));
+ __ cmp(object, Operand(isolate()->factory()->null_value()));
__ b(ne, &object_not_null);
if (ReturnTrueFalseObject()) {
__ Move(r0, factory->false_value());
Index: src/arm64/code-stubs-arm64.cc
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc
index
b2cc4dc5e577903884e3a1ce99f03c3e6a6b82a0..374eff36c05b91a4588a91c4df1c5116797f22bc
100644
--- a/src/arm64/code-stubs-arm64.cc
+++ b/src/arm64/code-stubs-arm64.cc
@@ -1569,7 +1569,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
__ Mov(result, res_false);
// Null is not instance of anything.
- __ Cmp(object_type, Operand(isolate()->factory()->null_value()));
+ __ Cmp(object, Operand(isolate()->factory()->null_value()));
__ B(ne, &object_not_null);
__ Ret();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.