Revision: 2546 Author: [email protected] Date: Tue Jul 28 01:22:48 2009 Log: X64: Fixed bug de-tagging of smis in multiplication code. Moved some dummy function implementations to from ic-x64.cc to stub-cache-x64.cc (where they belong)
Review URL: http://codereview.chromium.org/159404 http://code.google.com/p/v8/source/detail?r=2546 Modified: /branches/bleeding_edge/src/x64/codegen-x64.cc /branches/bleeding_edge/src/x64/ic-x64.cc /branches/bleeding_edge/src/x64/stub-cache-x64.cc ======================================= --- /branches/bleeding_edge/src/x64/codegen-x64.cc Fri Jul 24 04:22:35 2009 +++ /branches/bleeding_edge/src/x64/codegen-x64.cc Tue Jul 28 01:22:48 2009 @@ -5154,7 +5154,7 @@ ASSERT(kSmiTag == 0); // Adjust code below if not the case. // Remove smi tag from the left operand (but keep sign). // Left-hand operand has been copied into answer. - __ sar(answer.reg(), Immediate(kSmiTagSize)); + __ sarl(answer.reg(), Immediate(kSmiTagSize)); // Do multiplication of smis, leaving result in answer. __ imull(answer.reg(), right->reg()); // Go slow on overflows. @@ -5183,6 +5183,7 @@ break; case Token::BIT_XOR: + ASSERT(kSmiTag == 0); // Adjust code below if not the case. __ xor_(answer.reg(), right->reg()); break; @@ -6430,7 +6431,7 @@ __ jmp(&done); __ bind(&load_smi); - __ sar(src, Immediate(kSmiTagSize)); + __ sarl(src, Immediate(kSmiTagSize)); __ cvtlsi2sd(dst, src); __ bind(&done); @@ -6586,7 +6587,7 @@ // If the smi tag is 0 we can just leave the tag on one operand. ASSERT(kSmiTag == 0); // adjust code below if not the case // Remove tag from one of the operands (but keep sign). - __ sar(rax, Immediate(kSmiTagSize)); + __ sarl(rax, Immediate(kSmiTagSize)); // Do multiplication. __ imull(rax, rbx); // multiplication of smis; result in eax // Go slow on overflows. ======================================= --- /branches/bleeding_edge/src/x64/ic-x64.cc Mon Jul 27 03:39:21 2009 +++ /branches/bleeding_edge/src/x64/ic-x64.cc Tue Jul 28 01:22:48 2009 @@ -299,6 +299,7 @@ __ IncrementCounter(&Counters::keyed_load_generic_smi, 1); __ ret(0); } + void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { // ----------- S t a t e ------------- @@ -309,55 +310,19 @@ Generate(masm, ExternalReference(Runtime::kKeyedGetProperty)); } + bool KeyedLoadIC::PatchInlinedLoad(Address address, Object* map) { // Never patch the map in the map check, so the check always fails. return false; } + bool KeyedStoreIC::PatchInlinedStore(Address address, Object* map) { // Never patch the map in the map check, so the check always fails. return false; } -Object* KeyedLoadStubCompiler::CompileLoadArrayLength(String* name) { - UNIMPLEMENTED(); - return NULL; -} - -Object* KeyedLoadStubCompiler::CompileLoadCallback(String* name, - JSObject* object, - JSObject* holder, - AccessorInfo* callback) { - UNIMPLEMENTED(); - return NULL; -} - -Object* KeyedLoadStubCompiler::CompileLoadConstant(String* name, - JSObject* object, - JSObject* holder, - Object* callback) { - UNIMPLEMENTED(); - return NULL; -} - - -Object* KeyedLoadStubCompiler::CompileLoadFunctionPrototype(String* name) { - UNIMPLEMENTED(); - return NULL; -} - -Object* KeyedLoadStubCompiler::CompileLoadInterceptor(JSObject* object, - JSObject* holder, - String* name) { - UNIMPLEMENTED(); - return NULL; -} - -Object* KeyedLoadStubCompiler::CompileLoadStringLength(String* name) { - UNIMPLEMENTED(); - return NULL; -} void KeyedStoreIC::Generate(MacroAssembler* masm, ExternalReference const& f) { // ----------- S t a t e ------------- ======================================= --- /branches/bleeding_edge/src/x64/stub-cache-x64.cc Mon Jul 27 08:02:35 2009 +++ /branches/bleeding_edge/src/x64/stub-cache-x64.cc Tue Jul 28 01:22:48 2009 @@ -419,6 +419,51 @@ } +Object* KeyedLoadStubCompiler::CompileLoadArrayLength(String* name) { + UNIMPLEMENTED(); + return NULL; +} + + +Object* KeyedLoadStubCompiler::CompileLoadCallback(String* name, + JSObject* object, + JSObject* holder, + AccessorInfo* callback) { + UNIMPLEMENTED(); + return NULL; +} + + +Object* KeyedLoadStubCompiler::CompileLoadConstant(String* name, + JSObject* object, + JSObject* holder, + Object* callback) { + UNIMPLEMENTED(); + return NULL; +} + + +Object* KeyedLoadStubCompiler::CompileLoadFunctionPrototype(String* name) { + UNIMPLEMENTED(); + return NULL; +} + + +Object* KeyedLoadStubCompiler::CompileLoadInterceptor(JSObject* object, + JSObject* holder, + String* name) { + UNIMPLEMENTED(); + return NULL; +} + + +Object* KeyedLoadStubCompiler::CompileLoadStringLength(String* name) { + UNIMPLEMENTED(); + return NULL; +} + + + Object* StoreStubCompiler::CompileStoreCallback(JSObject* a, AccessorInfo* b, String* c) { --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
