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

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 10254005: ia32: Redefine register usage in LoadIC/KeyedLoadIC to match StoreIC and KeyedStoreIC (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments; removed debug code Created 8 years, 8 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/ia32/ic-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after
2107 __ mov(result, Operand::Cell(instr->hydrogen()->cell())); 2107 __ mov(result, Operand::Cell(instr->hydrogen()->cell()));
2108 if (instr->hydrogen()->RequiresHoleCheck()) { 2108 if (instr->hydrogen()->RequiresHoleCheck()) {
2109 __ cmp(result, factory()->the_hole_value()); 2109 __ cmp(result, factory()->the_hole_value());
2110 DeoptimizeIf(equal, instr->environment()); 2110 DeoptimizeIf(equal, instr->environment());
2111 } 2111 }
2112 } 2112 }
2113 2113
2114 2114
2115 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2115 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2116 ASSERT(ToRegister(instr->context()).is(esi)); 2116 ASSERT(ToRegister(instr->context()).is(esi));
2117 ASSERT(ToRegister(instr->global_object()).is(eax)); 2117 ASSERT(ToRegister(instr->global_object()).is(edx));
2118 ASSERT(ToRegister(instr->result()).is(eax)); 2118 ASSERT(ToRegister(instr->result()).is(eax));
2119 2119
2120 __ mov(ecx, instr->name()); 2120 __ mov(ecx, instr->name());
2121 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET : 2121 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET :
2122 RelocInfo::CODE_TARGET_CONTEXT; 2122 RelocInfo::CODE_TARGET_CONTEXT;
2123 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); 2123 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
2124 CallCode(ic, mode, instr); 2124 CallCode(ic, mode, instr);
2125 } 2125 }
2126 2126
2127 2127
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
2305 DeoptimizeIf(not_equal, instr->environment()); 2305 DeoptimizeIf(not_equal, instr->environment());
2306 EmitLoadFieldOrConstantFunction(result, object, map, name); 2306 EmitLoadFieldOrConstantFunction(result, object, map, name);
2307 } 2307 }
2308 __ bind(&done); 2308 __ bind(&done);
2309 } 2309 }
2310 } 2310 }
2311 2311
2312 2312
2313 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 2313 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2314 ASSERT(ToRegister(instr->context()).is(esi)); 2314 ASSERT(ToRegister(instr->context()).is(esi));
2315 ASSERT(ToRegister(instr->object()).is(eax)); 2315 ASSERT(ToRegister(instr->object()).is(edx));
2316 ASSERT(ToRegister(instr->result()).is(eax)); 2316 ASSERT(ToRegister(instr->result()).is(eax));
2317 2317
2318 __ mov(ecx, instr->name()); 2318 __ mov(ecx, instr->name());
2319 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); 2319 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
2320 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2320 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2321 } 2321 }
2322 2322
2323 2323
2324 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 2324 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
2325 Register function = ToRegister(instr->function()); 2325 Register function = ToRegister(instr->function());
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2526 UNREACHABLE(); 2526 UNREACHABLE();
2527 break; 2527 break;
2528 } 2528 }
2529 } 2529 }
2530 } 2530 }
2531 2531
2532 2532
2533 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 2533 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
2534 ASSERT(ToRegister(instr->context()).is(esi)); 2534 ASSERT(ToRegister(instr->context()).is(esi));
2535 ASSERT(ToRegister(instr->object()).is(edx)); 2535 ASSERT(ToRegister(instr->object()).is(edx));
2536 ASSERT(ToRegister(instr->key()).is(eax)); 2536 ASSERT(ToRegister(instr->key()).is(ecx));
2537 2537
2538 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); 2538 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
2539 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2539 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2540 } 2540 }
2541 2541
2542 2542
2543 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 2543 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
2544 Register result = ToRegister(instr->result()); 2544 Register result = ToRegister(instr->result());
2545 2545
2546 if (instr->hydrogen()->from_inlined()) { 2546 if (instr->hydrogen()->from_inlined()) {
(...skipping 2478 matching lines...) Expand 10 before | Expand all | Expand 10 after
5025 FixedArray::kHeaderSize - kPointerSize)); 5025 FixedArray::kHeaderSize - kPointerSize));
5026 __ bind(&done); 5026 __ bind(&done);
5027 } 5027 }
5028 5028
5029 5029
5030 #undef __ 5030 #undef __
5031 5031
5032 } } // namespace v8::internal 5032 } } // namespace v8::internal
5033 5033
5034 #endif // V8_TARGET_ARCH_IA32 5034 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698