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

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

Issue 558069: Change StoreIC interface on x64 to pass receiver in rdx, not on stack. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 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/full-codegen-x64.cc ('k') | src/x64/stub-cache-x64.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2010 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
11 // with the distribution. 11 // with the distribution.
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 Address offset_address = 1323 Address offset_address =
1324 test_instruction_address + delta + kOffsetToLoadInstruction + 3; 1324 test_instruction_address + delta + kOffsetToLoadInstruction + 3;
1325 *reinterpret_cast<int*>(offset_address) = offset - kHeapObjectTag; 1325 *reinterpret_cast<int*>(offset_address) = offset - kHeapObjectTag;
1326 return true; 1326 return true;
1327 } 1327 }
1328 1328
1329 void StoreIC::GenerateMiss(MacroAssembler* masm) { 1329 void StoreIC::GenerateMiss(MacroAssembler* masm) {
1330 // ----------- S t a t e ------------- 1330 // ----------- S t a t e -------------
1331 // -- rax : value 1331 // -- rax : value
1332 // -- rcx : name 1332 // -- rcx : name
1333 // -- rdx : receiver
1333 // -- rsp[0] : return address 1334 // -- rsp[0] : return address
1334 // -- rsp[8] : receiver
1335 // ----------------------------------- 1335 // -----------------------------------
1336 1336
1337 __ pop(rbx); 1337 __ pop(rbx);
1338 __ push(Operand(rsp, 0)); // receiver 1338 __ push(rdx); // receiver
1339 __ push(rcx); // name 1339 __ push(rcx); // name
1340 __ push(rax); // value 1340 __ push(rax); // value
1341 __ push(rbx); // return address 1341 __ push(rbx); // return address
1342 1342
1343 // Perform tail call to the entry. 1343 // Perform tail call to the entry.
1344 __ TailCallRuntime(ExternalReference(IC_Utility(kStoreIC_Miss)), 3, 1); 1344 __ TailCallRuntime(ExternalReference(IC_Utility(kStoreIC_Miss)), 3, 1);
1345 } 1345 }
1346 1346
1347 void StoreIC::GenerateExtendStorage(MacroAssembler* masm) { 1347 void StoreIC::GenerateExtendStorage(MacroAssembler* masm) {
1348 // ----------- S t a t e ------------- 1348 // ----------- S t a t e -------------
1349 // -- rax : value 1349 // -- rax : value
1350 // -- rcx : Map (target of map transition) 1350 // -- rcx : Map (target of map transition)
1351 // -- rdx : receiver
1351 // -- rsp[0] : return address 1352 // -- rsp[0] : return address
1352 // -- rsp[8] : receiver
1353 // ----------------------------------- 1353 // -----------------------------------
1354 1354
1355 __ pop(rbx); 1355 __ pop(rbx);
1356 __ push(Operand(rsp, 0)); // receiver 1356 __ push(rdx); // receiver
1357 __ push(rcx); // transition map 1357 __ push(rcx); // transition map
1358 __ push(rax); // value 1358 __ push(rax); // value
1359 __ push(rbx); // return address 1359 __ push(rbx); // return address
1360 1360
1361 // Perform tail call to the entry. 1361 // Perform tail call to the entry.
1362 __ TailCallRuntime( 1362 __ TailCallRuntime(
1363 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3, 1); 1363 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3, 1);
1364 } 1364 }
1365 1365
1366 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 1366 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
1367 // ----------- S t a t e ------------- 1367 // ----------- S t a t e -------------
1368 // -- rax : value 1368 // -- rax : value
1369 // -- rcx : name 1369 // -- rcx : name
1370 // -- rdx : receiver
1370 // -- rsp[0] : return address 1371 // -- rsp[0] : return address
1371 // -- rsp[8] : receiver
1372 // ----------------------------------- 1372 // -----------------------------------
1373 1373
1374 // Get the receiver from the stack and probe the stub cache. 1374 // Get the receiver from the stack and probe the stub cache.
1375 __ movq(rdx, Operand(rsp, kPointerSize));
1376 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, 1375 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC,
1377 NOT_IN_LOOP, 1376 NOT_IN_LOOP,
1378 MONOMORPHIC); 1377 MONOMORPHIC);
1379 StubCache::GenerateProbe(masm, flags, rdx, rcx, rbx, no_reg); 1378 StubCache::GenerateProbe(masm, flags, rdx, rcx, rbx, no_reg);
1380 1379
1381 // Cache miss: Jump to runtime. 1380 // Cache miss: Jump to runtime.
1382 GenerateMiss(masm); 1381 GenerateMiss(masm);
1383 } 1382 }
1384 1383
1385 1384
1386 #undef __ 1385 #undef __
1387 1386
1388 1387
1389 } } // namespace v8::internal 1388 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698