From f8d0013f7858953ee1e9959ac5ef2bda89b8bbd4 Mon Sep 17 00:00:00 2001 From: "yangguo@chromium.org" Date: Wed, 13 Mar 2013 09:28:08 +0000 Subject: [PATCH] DateField cache should check the ExternalOperand instead of ExternalReference on X64 Review URL: https://chromiumcodereview.appspot.com/12637025 Patch from Weiliang Lin . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/x64/full-codegen-x64.cc | 3 ++- src/x64/lithium-codegen-x64.cc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc index 299fc45762..ee510eb44c 100644 --- a/src/x64/full-codegen-x64.cc +++ b/src/x64/full-codegen-x64.cc @@ -3058,7 +3058,8 @@ void FullCodeGenerator::EmitDateField(CallRuntime* expr) { } else { if (index->value() < JSDate::kFirstUncachedField) { ExternalReference stamp = ExternalReference::date_cache_stamp(isolate()); - __ movq(scratch, stamp); + Operand stamp_operand = __ ExternalOperand(stamp); + __ movq(scratch, stamp_operand); __ cmpq(scratch, FieldOperand(object, JSDate::kCacheStampOffset)); __ j(not_equal, &runtime, Label::kNear); __ movq(result, FieldOperand(object, JSDate::kValueOffset + diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc index 81976a6b53..cf786980c0 100644 --- a/src/x64/lithium-codegen-x64.cc +++ b/src/x64/lithium-codegen-x64.cc @@ -1643,7 +1643,8 @@ void LCodeGen::DoDateField(LDateField* instr) { } else { if (index->value() < JSDate::kFirstUncachedField) { ExternalReference stamp = ExternalReference::date_cache_stamp(isolate()); - __ movq(kScratchRegister, stamp); + Operand stamp_operand = __ ExternalOperand(stamp); + __ movq(kScratchRegister, stamp_operand); __ cmpq(kScratchRegister, FieldOperand(object, JSDate::kCacheStampOffset)); __ j(not_equal, &runtime, Label::kNear);