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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 767743002: Hydrogen code stubs for vector-based ICs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 6 years 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 | « no previous file | src/arm/lithium-arm.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 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_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 __ LoadRoot(r0, Heap::kTrueValueRootIndex, eq); 1431 __ LoadRoot(r0, Heap::kTrueValueRootIndex, eq);
1432 __ LoadRoot(r0, Heap::kFalseValueRootIndex, ne); 1432 __ LoadRoot(r0, Heap::kFalseValueRootIndex, ne);
1433 __ Ret(HasArgsInRegisters() ? 0 : 2); 1433 __ Ret(HasArgsInRegisters() ? 0 : 2);
1434 } 1434 }
1435 } 1435 }
1436 1436
1437 1437
1438 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { 1438 void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
1439 Label miss; 1439 Label miss;
1440 Register receiver = LoadDescriptor::ReceiverRegister(); 1440 Register receiver = LoadDescriptor::ReceiverRegister();
1441 // Ensure that the vector and slot registers won't be clobbered before
1442 // calling the miss handler.
1443 DCHECK(!FLAG_vector_ics ||
1444 !AreAliased(r4, r5, VectorLoadICDescriptor::VectorRegister(),
1445 VectorLoadICDescriptor::SlotRegister()));
1441 1446
1442 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r3, 1447 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r4,
1443 r4, &miss); 1448 r5, &miss);
1444 __ bind(&miss); 1449 __ bind(&miss);
1445 PropertyAccessCompiler::TailCallBuiltin( 1450 PropertyAccessCompiler::TailCallBuiltin(
1446 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); 1451 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC));
1447 } 1452 }
1448 1453
1449 1454
1450 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { 1455 void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
1451 // Return address is in lr. 1456 // Return address is in lr.
1452 Label miss; 1457 Label miss;
1453 1458
1454 Register receiver = LoadDescriptor::ReceiverRegister(); 1459 Register receiver = LoadDescriptor::ReceiverRegister();
1455 Register index = LoadDescriptor::NameRegister(); 1460 Register index = LoadDescriptor::NameRegister();
1456 Register scratch = r3; 1461 Register scratch = r5;
1457 Register result = r0; 1462 Register result = r0;
1458 DCHECK(!scratch.is(receiver) && !scratch.is(index)); 1463 DCHECK(!scratch.is(receiver) && !scratch.is(index));
1464 DCHECK(!FLAG_vector_ics ||
1465 (!scratch.is(VectorLoadICDescriptor::VectorRegister()) &&
1466 result.is(VectorLoadICDescriptor::SlotRegister())));
1459 1467
1468 // StringCharAtGenerator doesn't use the result register until it's passed
1469 // the different miss possibilities. If it did, we would have a conflict
1470 // when FLAG_vector_ics is true.
1460 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, 1471 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
1461 &miss, // When not a string. 1472 &miss, // When not a string.
1462 &miss, // When not a number. 1473 &miss, // When not a number.
1463 &miss, // When index out of range. 1474 &miss, // When index out of range.
1464 STRING_INDEX_IS_ARRAY_INDEX, 1475 STRING_INDEX_IS_ARRAY_INDEX,
1465 RECEIVER_IS_STRING); 1476 RECEIVER_IS_STRING);
1466 char_at_generator.GenerateFast(masm); 1477 char_at_generator.GenerateFast(masm);
1467 __ Ret(); 1478 __ Ret();
1468 1479
1469 StubRuntimeCallHelper call_helper; 1480 StubRuntimeCallHelper call_helper;
(...skipping 3248 matching lines...) Expand 10 before | Expand all | Expand 10 after
4718 MemOperand(fp, 6 * kPointerSize), 4729 MemOperand(fp, 6 * kPointerSize),
4719 NULL); 4730 NULL);
4720 } 4731 }
4721 4732
4722 4733
4723 #undef __ 4734 #undef __
4724 4735
4725 } } // namespace v8::internal 4736 } } // namespace v8::internal
4726 4737
4727 #endif // V8_TARGET_ARCH_ARM 4738 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698