Fix bug in 64 bit codegen causing us to always go slowcase in apply.
authorricow@chromium.org <ricow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 23 Aug 2010 11:21:09 +0000 (11:21 +0000)
committerricow@chromium.org <ricow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 23 Aug 2010 11:21:09 +0000 (11:21 +0000)
After introducing the direct instruction pointer in functions the
CallApplyLazy method was changed on all platforms. The change made to
the 64 bit version was wrong, not using the right operand for the code
comparisons always forcing us into slow case.

Review URL: http://codereview.chromium.org/3104027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5317 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/x64/codegen-x64.cc

index 77828d6..98dd978 100644 (file)
@@ -2619,7 +2619,7 @@ void CodeGenerator::CallApplyLazy(Expression* applicand,
       __ movq(rcx, FieldOperand(rax, JSFunction::kCodeEntryOffset));
       __ subq(rcx, Immediate(Code::kHeaderSize - kHeapObjectTag));
       Handle<Code> apply_code(Builtins::builtin(Builtins::FunctionApply));
-      __ Cmp(FieldOperand(rcx, SharedFunctionInfo::kCodeOffset), apply_code);
+      __ Cmp(rcx, apply_code);
       __ j(not_equal, &build_args);
 
       // Check that applicand is a function.