Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: src/x64/ic-x64.cc

Issue 174639: Use a root array register for constant loads and stack guards on x64.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 __ cmpl(rbx, Immediate(kLengthFieldLimit)); 332 __ cmpl(rbx, Immediate(kLengthFieldLimit));
333 __ j(above_equal, &slow); 333 __ j(above_equal, &slow);
334 __ movl(rax, rbx); 334 __ movl(rax, rbx);
335 __ and_(rax, Immediate((1 << String::kShortLengthShift) - 1)); 335 __ and_(rax, Immediate((1 << String::kShortLengthShift) - 1));
336 __ shrl(rax, Immediate(String::kLongLengthShift)); 336 __ shrl(rax, Immediate(String::kLongLengthShift));
337 __ jmp(&index_int); 337 __ jmp(&index_int);
338 // Fast case: Do the load. 338 // Fast case: Do the load.
339 __ bind(&fast); 339 __ bind(&fast);
340 __ movq(rax, Operand(rcx, rax, times_pointer_size, 340 __ movq(rax, Operand(rcx, rax, times_pointer_size,
341 FixedArray::kHeaderSize - kHeapObjectTag)); 341 FixedArray::kHeaderSize - kHeapObjectTag));
342 __ Cmp(rax, Factory::the_hole_value()); 342 __ CompareRoot(rax, Heap::kTheHoleValueRootIndex);
343 // In case the loaded value is the_hole we have to consult GetProperty 343 // In case the loaded value is the_hole we have to consult GetProperty
344 // to ensure the prototype chain is searched. 344 // to ensure the prototype chain is searched.
345 __ j(equal, &slow); 345 __ j(equal, &slow);
346 __ IncrementCounter(&Counters::keyed_load_generic_smi, 1); 346 __ IncrementCounter(&Counters::keyed_load_generic_smi, 1);
347 __ ret(0); 347 __ ret(0);
348 } 348 }
349 349
350 350
351 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { 351 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
352 // ----------- S t a t e ------------- 352 // ----------- S t a t e -------------
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 // Check for string. 606 // Check for string.
607 __ bind(&non_number); 607 __ bind(&non_number);
608 __ CmpInstanceType(rbx, FIRST_NONSTRING_TYPE); 608 __ CmpInstanceType(rbx, FIRST_NONSTRING_TYPE);
609 __ j(above_equal, &non_string); 609 __ j(above_equal, &non_string);
610 StubCompiler::GenerateLoadGlobalFunctionPrototype( 610 StubCompiler::GenerateLoadGlobalFunctionPrototype(
611 masm, Context::STRING_FUNCTION_INDEX, rdx); 611 masm, Context::STRING_FUNCTION_INDEX, rdx);
612 __ jmp(&probe); 612 __ jmp(&probe);
613 613
614 // Check for boolean. 614 // Check for boolean.
615 __ bind(&non_string); 615 __ bind(&non_string);
616 __ Cmp(rdx, Factory::true_value()); 616 __ CompareRoot(rdx, Heap::kTrueValueRootIndex);
617 __ j(equal, &boolean); 617 __ j(equal, &boolean);
618 __ Cmp(rdx, Factory::false_value()); 618 __ CompareRoot(rdx, Heap::kFalseValueRootIndex);
619 __ j(not_equal, &miss); 619 __ j(not_equal, &miss);
620 __ bind(&boolean); 620 __ bind(&boolean);
621 StubCompiler::GenerateLoadGlobalFunctionPrototype( 621 StubCompiler::GenerateLoadGlobalFunctionPrototype(
622 masm, Context::BOOLEAN_FUNCTION_INDEX, rdx); 622 masm, Context::BOOLEAN_FUNCTION_INDEX, rdx);
623 623
624 // Probe the stub cache for the value object. 624 // Probe the stub cache for the value object.
625 __ bind(&probe); 625 __ bind(&probe);
626 StubCache::GenerateProbe(masm, flags, rdx, rcx, rbx, no_reg); 626 StubCache::GenerateProbe(masm, flags, rdx, rcx, rbx, no_reg);
627 627
628 // Cache miss: Jump to runtime. 628 // Cache miss: Jump to runtime.
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 979
980 // Cache miss: Jump to runtime. 980 // Cache miss: Jump to runtime.
981 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss))); 981 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss)));
982 } 982 }
983 983
984 984
985 #undef __ 985 #undef __
986 986
987 987
988 } } // namespace v8::internal 988 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698