OLD | NEW |
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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/interface-descriptors.h" | 9 #include "src/interface-descriptors.h" |
10 | 10 |
11 namespace v8 { | 11 namespace v8 { |
12 namespace internal { | 12 namespace internal { |
13 | 13 |
14 const Register InterfaceDescriptor::ContextRegister() { return cp; } | 14 const Register InterfaceDescriptor::ContextRegister() { return cp; } |
15 | 15 |
16 | 16 |
17 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { | 17 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
| 18 InitializeForIsolateAllPlatforms(isolate); |
| 19 |
| 20 { |
| 21 CallInterfaceDescriptor* descriptor = |
| 22 isolate->call_descriptor(CallDescriptorKey::FastNewClosureCall); |
| 23 Register registers[] = {cp, a2}; |
| 24 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 25 } |
| 26 { |
| 27 CallInterfaceDescriptor* descriptor = |
| 28 isolate->call_descriptor(CallDescriptorKey::FastNewContextCall); |
| 29 Register registers[] = {cp, a1}; |
| 30 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 31 } |
| 32 { |
| 33 CallInterfaceDescriptor* descriptor = |
| 34 isolate->call_descriptor(CallDescriptorKey::ToNumberCall); |
| 35 Register registers[] = {cp, a0}; |
| 36 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 37 } |
| 38 { |
| 39 CallInterfaceDescriptor* descriptor = |
| 40 isolate->call_descriptor(CallDescriptorKey::NumberToStringCall); |
| 41 Register registers[] = {cp, a0}; |
| 42 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 43 } |
| 44 { |
| 45 CallInterfaceDescriptor* descriptor = |
| 46 isolate->call_descriptor(CallDescriptorKey::FastCloneShallowArrayCall); |
| 47 Register registers[] = {cp, a3, a2, a1}; |
| 48 Representation representations[] = { |
| 49 Representation::Tagged(), Representation::Tagged(), |
| 50 Representation::Smi(), Representation::Tagged()}; |
| 51 descriptor->Initialize(arraysize(registers), registers, representations); |
| 52 } |
| 53 { |
| 54 CallInterfaceDescriptor* descriptor = |
| 55 isolate->call_descriptor(CallDescriptorKey::FastCloneShallowObjectCall); |
| 56 Register registers[] = {cp, a3, a2, a1, a0}; |
| 57 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 58 } |
| 59 { |
| 60 CallInterfaceDescriptor* descriptor = |
| 61 isolate->call_descriptor(CallDescriptorKey::CreateAllocationSiteCall); |
| 62 Register registers[] = {cp, a2, a3}; |
| 63 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 64 } |
| 65 { |
| 66 CallInterfaceDescriptor* descriptor = |
| 67 isolate->call_descriptor(CallDescriptorKey::RegExpConstructResultCall); |
| 68 Register registers[] = {cp, a2, a1, a0}; |
| 69 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 70 } |
| 71 { |
| 72 CallInterfaceDescriptor* descriptor = |
| 73 isolate->call_descriptor(CallDescriptorKey::TransitionElementsKindCall); |
| 74 Register registers[] = {cp, a0, a1}; |
| 75 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 76 } |
| 77 { |
| 78 CallInterfaceDescriptor* descriptor = isolate->call_descriptor( |
| 79 CallDescriptorKey::ArrayConstructorConstantArgCountCall); |
| 80 // register state |
| 81 // cp -- context |
| 82 // a0 -- number of arguments |
| 83 // a1 -- function |
| 84 // a2 -- allocation site with elements kind |
| 85 Register registers[] = {cp, a1, a2}; |
| 86 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 87 } |
| 88 { |
| 89 CallInterfaceDescriptor* descriptor = |
| 90 isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall); |
| 91 // stack param count needs (constructor pointer, and single argument) |
| 92 Register registers[] = {cp, a1, a2, a0}; |
| 93 Representation representations[] = { |
| 94 Representation::Tagged(), Representation::Tagged(), |
| 95 Representation::Tagged(), Representation::Integer32()}; |
| 96 descriptor->Initialize(arraysize(registers), registers, representations); |
| 97 } |
| 98 { |
| 99 CallInterfaceDescriptor* descriptor = isolate->call_descriptor( |
| 100 CallDescriptorKey::InternalArrayConstructorConstantArgCountCall); |
| 101 // register state |
| 102 // cp -- context |
| 103 // a0 -- number of arguments |
| 104 // a1 -- constructor function |
| 105 Register registers[] = {cp, a1}; |
| 106 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 107 } |
| 108 { |
| 109 CallInterfaceDescriptor* descriptor = isolate->call_descriptor( |
| 110 CallDescriptorKey::InternalArrayConstructorCall); |
| 111 // stack param count needs (constructor pointer, and single argument) |
| 112 Register registers[] = {cp, a1, a0}; |
| 113 Representation representations[] = {Representation::Tagged(), |
| 114 Representation::Tagged(), |
| 115 Representation::Integer32()}; |
| 116 descriptor->Initialize(arraysize(registers), registers, representations); |
| 117 } |
| 118 { |
| 119 CallInterfaceDescriptor* descriptor = |
| 120 isolate->call_descriptor(CallDescriptorKey::CompareNilCall); |
| 121 Register registers[] = {cp, a0}; |
| 122 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 123 } |
| 124 { |
| 125 CallInterfaceDescriptor* descriptor = |
| 126 isolate->call_descriptor(CallDescriptorKey::ToBooleanCall); |
| 127 Register registers[] = {cp, a0}; |
| 128 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 129 } |
| 130 { |
| 131 CallInterfaceDescriptor* descriptor = |
| 132 isolate->call_descriptor(CallDescriptorKey::BinaryOpCall); |
| 133 Register registers[] = {cp, a1, a0}; |
| 134 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 135 } |
| 136 { |
| 137 CallInterfaceDescriptor* descriptor = isolate->call_descriptor( |
| 138 CallDescriptorKey::BinaryOpWithAllocationSiteCall); |
| 139 Register registers[] = {cp, a2, a1, a0}; |
| 140 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 141 } |
| 142 { |
| 143 CallInterfaceDescriptor* descriptor = |
| 144 isolate->call_descriptor(CallDescriptorKey::StringAddCall); |
| 145 Register registers[] = {cp, a1, a0}; |
| 146 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 147 } |
| 148 |
18 { | 149 { |
19 CallInterfaceDescriptor* descriptor = | 150 CallInterfaceDescriptor* descriptor = |
20 isolate->call_descriptor(CallDescriptorKey::ArgumentAdaptorCall); | 151 isolate->call_descriptor(CallDescriptorKey::ArgumentAdaptorCall); |
21 Register registers[] = { cp, // context | 152 Register registers[] = { cp, // context |
22 a1, // JSFunction | 153 a1, // JSFunction |
23 a0, // actual number of arguments | 154 a0, // actual number of arguments |
24 a2, // expected number of arguments | 155 a2, // expected number of arguments |
25 }; | 156 }; |
26 Representation representations[] = { | 157 Representation representations[] = { |
27 Representation::Tagged(), // context | 158 Representation::Tagged(), // context |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 Representation::Tagged(), // holder | 214 Representation::Tagged(), // holder |
84 Representation::External(), // api_function_address | 215 Representation::External(), // api_function_address |
85 }; | 216 }; |
86 descriptor->Initialize(arraysize(registers), registers, representations); | 217 descriptor->Initialize(arraysize(registers), registers, representations); |
87 } | 218 } |
88 } | 219 } |
89 } | 220 } |
90 } // namespace v8::internal | 221 } // namespace v8::internal |
91 | 222 |
92 #endif // V8_TARGET_ARCH_MIPS64 | 223 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |