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

Side by Side Diff: src/mips/code-stubs-mips.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 | « src/ic/x87/stub-cache-x87.cc ('k') | src/mips/lithium-codegen-mips.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_MIPS 7 #if V8_TARGET_ARCH_MIPS
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 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 __ Jump(ra); 1340 __ Jump(ra);
1341 } 1341 }
1342 1342
1343 1343
1344 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { 1344 void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
1345 // Return address is in ra. 1345 // Return address is in ra.
1346 Label miss; 1346 Label miss;
1347 1347
1348 Register receiver = LoadDescriptor::ReceiverRegister(); 1348 Register receiver = LoadDescriptor::ReceiverRegister();
1349 Register index = LoadDescriptor::NameRegister(); 1349 Register index = LoadDescriptor::NameRegister();
1350 Register scratch = a3; 1350 Register scratch = t1;
1351 Register result = v0; 1351 Register result = v0;
1352 DCHECK(!scratch.is(receiver) && !scratch.is(index)); 1352 DCHECK(!scratch.is(receiver) && !scratch.is(index));
1353 DCHECK(!FLAG_vector_ics ||
1354 (!scratch.is(VectorLoadICDescriptor::VectorRegister()) &&
1355 result.is(VectorLoadICDescriptor::SlotRegister())));
1353 1356
1357 // StringCharAtGenerator doesn't use the result register until it's passed
1358 // the different miss possibilities. If it did, we would have a conflict
1359 // when FLAG_vector_ics is true.
1354 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, 1360 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
1355 &miss, // When not a string. 1361 &miss, // When not a string.
1356 &miss, // When not a number. 1362 &miss, // When not a number.
1357 &miss, // When index out of range. 1363 &miss, // When index out of range.
1358 STRING_INDEX_IS_ARRAY_INDEX, 1364 STRING_INDEX_IS_ARRAY_INDEX,
1359 RECEIVER_IS_STRING); 1365 RECEIVER_IS_STRING);
1360 char_at_generator.GenerateFast(masm); 1366 char_at_generator.GenerateFast(masm);
1361 __ Ret(); 1367 __ Ret();
1362 1368
1363 StubRuntimeCallHelper call_helper; 1369 StubRuntimeCallHelper call_helper;
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 __ DropAndRet(HasArgsInRegisters() ? 0 : 2, eq, a0, Operand(zero_reg)); 1563 __ DropAndRet(HasArgsInRegisters() ? 0 : 2, eq, a0, Operand(zero_reg));
1558 __ LoadRoot(v0, Heap::kFalseValueRootIndex); 1564 __ LoadRoot(v0, Heap::kFalseValueRootIndex);
1559 __ DropAndRet(HasArgsInRegisters() ? 0 : 2); 1565 __ DropAndRet(HasArgsInRegisters() ? 0 : 2);
1560 } 1566 }
1561 } 1567 }
1562 1568
1563 1569
1564 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { 1570 void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
1565 Label miss; 1571 Label miss;
1566 Register receiver = LoadDescriptor::ReceiverRegister(); 1572 Register receiver = LoadDescriptor::ReceiverRegister();
1567 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, a3, 1573 // Ensure that the vector and slot registers won't be clobbered before
1568 t0, &miss); 1574 // calling the miss handler.
1575 DCHECK(!FLAG_vector_ics ||
1576 !AreAliased(t0, t1, VectorLoadICDescriptor::VectorRegister(),
1577 VectorLoadICDescriptor::SlotRegister()));
1578
1579 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, t0,
1580 t1, &miss);
1569 __ bind(&miss); 1581 __ bind(&miss);
1570 PropertyAccessCompiler::TailCallBuiltin( 1582 PropertyAccessCompiler::TailCallBuiltin(
1571 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); 1583 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC));
1572 } 1584 }
1573 1585
1574 1586
1575 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { 1587 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
1576 // The displacement is the offset of the last parameter (if any) 1588 // The displacement is the offset of the last parameter (if any)
1577 // relative to the frame pointer. 1589 // relative to the frame pointer.
1578 const int kDisplacement = 1590 const int kDisplacement =
(...skipping 3352 matching lines...) Expand 10 before | Expand all | Expand 10 after
4931 MemOperand(fp, 6 * kPointerSize), 4943 MemOperand(fp, 6 * kPointerSize),
4932 NULL); 4944 NULL);
4933 } 4945 }
4934 4946
4935 4947
4936 #undef __ 4948 #undef __
4937 4949
4938 } } // namespace v8::internal 4950 } } // namespace v8::internal
4939 4951
4940 #endif // V8_TARGET_ARCH_MIPS 4952 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/x87/stub-cache-x87.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698