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

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

Issue 356133005: X87: Use IC register definitions in platform files. (Closed) Base URL: https://github.com/v8/v8.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « src/x87/ic-x87.cc ('k') | src/x87/lithium-x87.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2949 matching lines...) Expand 10 before | Expand all | Expand 10 after
2960 __ mov(result, Operand::ForCell(instr->hydrogen()->cell().handle())); 2960 __ mov(result, Operand::ForCell(instr->hydrogen()->cell().handle()));
2961 if (instr->hydrogen()->RequiresHoleCheck()) { 2961 if (instr->hydrogen()->RequiresHoleCheck()) {
2962 __ cmp(result, factory()->the_hole_value()); 2962 __ cmp(result, factory()->the_hole_value());
2963 DeoptimizeIf(equal, instr->environment()); 2963 DeoptimizeIf(equal, instr->environment());
2964 } 2964 }
2965 } 2965 }
2966 2966
2967 2967
2968 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2968 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2969 ASSERT(ToRegister(instr->context()).is(esi)); 2969 ASSERT(ToRegister(instr->context()).is(esi));
2970 ASSERT(ToRegister(instr->global_object()).is(edx)); 2970 ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister()));
2971 ASSERT(ToRegister(instr->result()).is(eax)); 2971 ASSERT(ToRegister(instr->result()).is(eax));
2972 2972
2973 __ mov(ecx, instr->name()); 2973 __ mov(LoadIC::NameRegister(), instr->name());
2974 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2974 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
2975 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); 2975 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode);
2976 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2976 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2977 } 2977 }
2978 2978
2979 2979
2980 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { 2980 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
2981 Register value = ToRegister(instr->value()); 2981 Register value = ToRegister(instr->value());
2982 Handle<PropertyCell> cell_handle = instr->hydrogen()->cell().handle(); 2982 Handle<PropertyCell> cell_handle = instr->hydrogen()->cell().handle();
2983 2983
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
3092 } else if (operand->IsRegister()) { 3092 } else if (operand->IsRegister()) {
3093 __ push(ToRegister(operand)); 3093 __ push(ToRegister(operand));
3094 } else { 3094 } else {
3095 __ push(ToOperand(operand)); 3095 __ push(ToOperand(operand));
3096 } 3096 }
3097 } 3097 }
3098 3098
3099 3099
3100 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3100 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3101 ASSERT(ToRegister(instr->context()).is(esi)); 3101 ASSERT(ToRegister(instr->context()).is(esi));
3102 ASSERT(ToRegister(instr->object()).is(edx)); 3102 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
3103 ASSERT(ToRegister(instr->result()).is(eax)); 3103 ASSERT(ToRegister(instr->result()).is(eax));
3104 3104
3105 __ mov(ecx, instr->name()); 3105 __ mov(LoadIC::NameRegister(), instr->name());
3106 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); 3106 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL);
3107 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3107 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3108 } 3108 }
3109 3109
3110 3110
3111 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3111 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3112 Register function = ToRegister(instr->function()); 3112 Register function = ToRegister(instr->function());
3113 Register temp = ToRegister(instr->temp()); 3113 Register temp = ToRegister(instr->temp());
3114 Register result = ToRegister(instr->result()); 3114 Register result = ToRegister(instr->result());
3115 3115
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
3330 return Operand(elements_pointer_reg, 3330 return Operand(elements_pointer_reg,
3331 ToRegister(key), 3331 ToRegister(key),
3332 scale_factor, 3332 scale_factor,
3333 base_offset); 3333 base_offset);
3334 } 3334 }
3335 } 3335 }
3336 3336
3337 3337
3338 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3338 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3339 ASSERT(ToRegister(instr->context()).is(esi)); 3339 ASSERT(ToRegister(instr->context()).is(esi));
3340 ASSERT(ToRegister(instr->object()).is(edx)); 3340 ASSERT(ToRegister(instr->object()).is(KeyedLoadIC::ReceiverRegister()));
3341 ASSERT(ToRegister(instr->key()).is(ecx)); 3341 ASSERT(ToRegister(instr->key()).is(KeyedLoadIC::NameRegister()));
3342 3342
3343 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); 3343 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
3344 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3344 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3345 } 3345 }
3346 3346
3347 3347
3348 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3348 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3349 Register result = ToRegister(instr->result()); 3349 Register result = ToRegister(instr->result());
3350 3350
3351 if (instr->hydrogen()->from_inlined()) { 3351 if (instr->hydrogen()->from_inlined()) {
(...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after
5698 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5698 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5699 RecordSafepoint(Safepoint::kNoLazyDeopt); 5699 RecordSafepoint(Safepoint::kNoLazyDeopt);
5700 } 5700 }
5701 5701
5702 5702
5703 #undef __ 5703 #undef __
5704 5704
5705 } } // namespace v8::internal 5705 } } // namespace v8::internal
5706 5706
5707 #endif // V8_TARGET_ARCH_X87 5707 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/ic-x87.cc ('k') | src/x87/lithium-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698