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

Side by Side Diff: src/x64/stub-cache-x64.cc

Issue 381633002: Use a register spec for StoreIC and KeyedStoreIC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code comments. Created 6 years, 5 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/lithium-x64.cc ('k') | no next file » | 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_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 Register* KeyedLoadStubCompiler::registers() { 1232 Register* KeyedLoadStubCompiler::registers() {
1233 // receiver, name, scratch1, scratch2, scratch3, scratch4. 1233 // receiver, name, scratch1, scratch2, scratch3, scratch4.
1234 Register receiver = LoadIC::ReceiverRegister(); 1234 Register receiver = LoadIC::ReceiverRegister();
1235 Register name = LoadIC::NameRegister(); 1235 Register name = LoadIC::NameRegister();
1236 static Register registers[] = { receiver, name, rax, rbx, rdi, r8 }; 1236 static Register registers[] = { receiver, name, rax, rbx, rdi, r8 };
1237 return registers; 1237 return registers;
1238 } 1238 }
1239 1239
1240 1240
1241 Register StoreStubCompiler::value() { 1241 Register StoreStubCompiler::value() {
1242 return rax; 1242 return StoreIC::ValueRegister();
1243 } 1243 }
1244 1244
1245 1245
1246 Register* StoreStubCompiler::registers() { 1246 Register* StoreStubCompiler::registers() {
1247 // receiver, name, scratch1, scratch2, scratch3. 1247 // receiver, name, scratch1, scratch2, scratch3.
1248 static Register registers[] = { rdx, rcx, rbx, rdi, r8 }; 1248 Register receiver = KeyedStoreIC::ReceiverRegister();
1249 Register name = KeyedStoreIC::NameRegister();
1250 static Register registers[] = { receiver, name, rbx, rdi, r8 };
1249 return registers; 1251 return registers;
1250 } 1252 }
1251 1253
1252 1254
1253 Register* KeyedStoreStubCompiler::registers() { 1255 Register* KeyedStoreStubCompiler::registers() {
1254 // receiver, name, scratch1, scratch2, scratch3. 1256 // receiver, name, scratch1, scratch2, scratch3.
1255 static Register registers[] = { rdx, rcx, rbx, rdi, r8 }; 1257 Register receiver = KeyedStoreIC::ReceiverRegister();
1258 Register name = KeyedStoreIC::NameRegister();
1259 static Register registers[] = { receiver, name, rbx, rdi, r8 };
1256 return registers; 1260 return registers;
1257 } 1261 }
1258 1262
1259 1263
1260 #undef __ 1264 #undef __
1261 #define __ ACCESS_MASM(masm) 1265 #define __ ACCESS_MASM(masm)
1262 1266
1263 1267
1264 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, 1268 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
1265 Handle<HeapType> type, 1269 Handle<HeapType> type,
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 // ----------------------------------- 1437 // -----------------------------------
1434 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1438 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1435 } 1439 }
1436 1440
1437 1441
1438 #undef __ 1442 #undef __
1439 1443
1440 } } // namespace v8::internal 1444 } } // namespace v8::internal
1441 1445
1442 #endif // V8_TARGET_ARCH_X64 1446 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698