OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 |
(...skipping 15 matching lines...) Expand all Loading... |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #include "v8.h" | 28 #include "v8.h" |
29 | 29 |
30 #if defined(V8_TARGET_ARCH_MIPS) | 30 #if defined(V8_TARGET_ARCH_MIPS) |
31 | 31 |
32 #include "bootstrapper.h" | 32 #include "bootstrapper.h" |
33 #include "code-stubs.h" | 33 #include "code-stubs.h" |
34 #include "codegen.h" | 34 #include "codegen.h" |
35 #include "regexp-macro-assembler.h" | 35 #include "regexp-macro-assembler.h" |
| 36 #include "stub-cache.h" |
36 | 37 |
37 namespace v8 { | 38 namespace v8 { |
38 namespace internal { | 39 namespace internal { |
39 | 40 |
40 | 41 |
41 void KeyedLoadFastElementStub::InitializeInterfaceDescriptor( | 42 void KeyedLoadFastElementStub::InitializeInterfaceDescriptor( |
42 Isolate* isolate, | 43 Isolate* isolate, |
43 CodeStubInterfaceDescriptor* descriptor) { | 44 CodeStubInterfaceDescriptor* descriptor) { |
44 static Register registers[] = { a1, a0 }; | 45 static Register registers[] = { a1, a0 }; |
45 descriptor->register_param_count_ = 2; | 46 descriptor->register_param_count_ = 2; |
(...skipping 4490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4536 } | 4537 } |
4537 __ mov(a0, v0); | 4538 __ mov(a0, v0); |
4538 __ LoadRoot(v0, Heap::kTrueValueRootIndex); | 4539 __ LoadRoot(v0, Heap::kTrueValueRootIndex); |
4539 __ DropAndRet(HasArgsInRegisters() ? 0 : 2, eq, a0, Operand(zero_reg)); | 4540 __ DropAndRet(HasArgsInRegisters() ? 0 : 2, eq, a0, Operand(zero_reg)); |
4540 __ LoadRoot(v0, Heap::kFalseValueRootIndex); | 4541 __ LoadRoot(v0, Heap::kFalseValueRootIndex); |
4541 __ DropAndRet(HasArgsInRegisters() ? 0 : 2); | 4542 __ DropAndRet(HasArgsInRegisters() ? 0 : 2); |
4542 } | 4543 } |
4543 } | 4544 } |
4544 | 4545 |
4545 | 4546 |
| 4547 void StringLengthStub::Generate(MacroAssembler* masm) { |
| 4548 Label miss; |
| 4549 Register receiver; |
| 4550 if (kind() == Code::KEYED_LOAD_IC) { |
| 4551 // ----------- S t a t e ------------- |
| 4552 // -- ra : return address |
| 4553 // -- a0 : key |
| 4554 // -- a1 : receiver |
| 4555 // ----------------------------------- |
| 4556 __ Branch(&miss, ne, a0, |
| 4557 Operand(masm->isolate()->factory()->length_symbol())); |
| 4558 receiver = a1; |
| 4559 } else { |
| 4560 ASSERT(kind() == Code::LOAD_IC); |
| 4561 // ----------- S t a t e ------------- |
| 4562 // -- a2 : name |
| 4563 // -- ra : return address |
| 4564 // -- a0 : receiver |
| 4565 // -- sp[0] : receiver |
| 4566 // ----------------------------------- |
| 4567 receiver = a0; |
| 4568 } |
| 4569 |
| 4570 StubCompiler::GenerateLoadStringLength(masm, receiver, a3, t0, &miss, |
| 4571 support_wrapper_); |
| 4572 |
| 4573 __ bind(&miss); |
| 4574 StubCompiler::GenerateLoadMiss(masm, kind()); |
| 4575 } |
| 4576 |
| 4577 |
4546 Register InstanceofStub::left() { return a0; } | 4578 Register InstanceofStub::left() { return a0; } |
4547 | 4579 |
4548 | 4580 |
4549 Register InstanceofStub::right() { return a1; } | 4581 Register InstanceofStub::right() { return a1; } |
4550 | 4582 |
4551 | 4583 |
4552 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { | 4584 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { |
4553 // The displacement is the offset of the last parameter (if any) | 4585 // The displacement is the offset of the last parameter (if any) |
4554 // relative to the frame pointer. | 4586 // relative to the frame pointer. |
4555 const int kDisplacement = | 4587 const int kDisplacement = |
(...skipping 3319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7875 __ Pop(ra, t1, a1); | 7907 __ Pop(ra, t1, a1); |
7876 __ Ret(); | 7908 __ Ret(); |
7877 } | 7909 } |
7878 | 7910 |
7879 | 7911 |
7880 #undef __ | 7912 #undef __ |
7881 | 7913 |
7882 } } // namespace v8::internal | 7914 } } // namespace v8::internal |
7883 | 7915 |
7884 #endif // V8_TARGET_ARCH_MIPS | 7916 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |