blob: 22fe9f06e1e50a5125158ba2c36ebb303d5d183f [file] [log] [blame]
Andrei Popescu31002712010-02-23 13:46:05 +00001// Copyright 2010 the V8 project authors. All rights reserved.
2// Redistribution and use in source and binary forms, with or without
3// modification, are permitted provided that the following conditions are
4// met:
5//
6// * Redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer.
8// * Redistributions in binary form must reproduce the above
9// copyright notice, this list of conditions and the following
10// disclaimer in the documentation and/or other materials provided
11// with the distribution.
12// * Neither the name of Google Inc. nor the names of its
13// contributors may be used to endorse or promote products derived
14// from this software without specific prior written permission.
15//
16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
Andrei Popescu31002712010-02-23 13:46:05 +000028#include "v8.h"
29
Leon Clarkef7060e22010-06-03 12:02:55 +010030#if defined(V8_TARGET_ARCH_MIPS)
31
Andrei Popescu31002712010-02-23 13:46:05 +000032#include "codegen-inl.h"
33#include "register-allocator-inl.h"
34#include "scopes.h"
Steve Block6ded16b2010-05-10 14:33:55 +010035#include "virtual-frame-inl.h"
Andrei Popescu31002712010-02-23 13:46:05 +000036
37namespace v8 {
38namespace internal {
39
Andrei Popescu31002712010-02-23 13:46:05 +000040#define __ ACCESS_MASM(masm())
41
Steve Block44f0eee2011-05-26 01:26:41 +010042void VirtualFrame::PopToA1A0() {
43 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +000044}
45
46
Steve Block44f0eee2011-05-26 01:26:41 +010047void VirtualFrame::PopToA1() {
48 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +000049}
50
51
Steve Block44f0eee2011-05-26 01:26:41 +010052void VirtualFrame::PopToA0() {
53 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +000054}
55
56
Steve Block44f0eee2011-05-26 01:26:41 +010057void VirtualFrame::MergeTo(const VirtualFrame* expected,
58 Condition cond,
59 Register r1,
60 const Operand& r2) {
61 UNIMPLEMENTED_MIPS();
62}
63
64
65void VirtualFrame::MergeTo(VirtualFrame* expected,
66 Condition cond,
67 Register r1,
68 const Operand& r2) {
69 UNIMPLEMENTED_MIPS();
70}
71
72
73void VirtualFrame::MergeTOSTo(
74 VirtualFrame::TopOfStack expected_top_of_stack_state,
75 Condition cond,
76 Register r1,
77 const Operand& r2) {
Andrei Popescu31002712010-02-23 13:46:05 +000078 UNIMPLEMENTED_MIPS();
79}
80
81
82void VirtualFrame::Enter() {
Steve Block44f0eee2011-05-26 01:26:41 +010083 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +000084}
85
86
87void VirtualFrame::Exit() {
88 UNIMPLEMENTED_MIPS();
89}
90
91
92void VirtualFrame::AllocateStackSlots() {
Andrei Popescu31002712010-02-23 13:46:05 +000093 UNIMPLEMENTED_MIPS();
94}
95
96
Andrei Popescu31002712010-02-23 13:46:05 +000097
98void VirtualFrame::PushReceiverSlotAddress() {
99 UNIMPLEMENTED_MIPS();
100}
101
102
Andrei Popescu31002712010-02-23 13:46:05 +0000103void VirtualFrame::PushTryHandler(HandlerType type) {
104 UNIMPLEMENTED_MIPS();
105}
106
107
Steve Block44f0eee2011-05-26 01:26:41 +0100108void VirtualFrame::CallJSFunction(int arg_count) {
Andrei Popescu31002712010-02-23 13:46:05 +0000109 UNIMPLEMENTED_MIPS();
110}
111
112
Steve Block44f0eee2011-05-26 01:26:41 +0100113void VirtualFrame::CallRuntime(const Runtime::Function* f, int arg_count) {
Andrei Popescu31002712010-02-23 13:46:05 +0000114 UNIMPLEMENTED_MIPS();
115}
116
117
Andrei Popescu31002712010-02-23 13:46:05 +0000118void VirtualFrame::CallRuntime(Runtime::FunctionId id, int arg_count) {
Andrei Popescu31002712010-02-23 13:46:05 +0000119 UNIMPLEMENTED_MIPS();
120}
121
122
Steve Block44f0eee2011-05-26 01:26:41 +0100123#ifdef ENABLE_DEBUGGER_SUPPORT
124void VirtualFrame::DebugBreak() {
Andrei Popescu31002712010-02-23 13:46:05 +0000125 UNIMPLEMENTED_MIPS();
126}
Steve Block44f0eee2011-05-26 01:26:41 +0100127#endif
Andrei Popescu31002712010-02-23 13:46:05 +0000128
129
130void VirtualFrame::InvokeBuiltin(Builtins::JavaScript id,
131 InvokeJSFlags flags,
Andrei Popescu31002712010-02-23 13:46:05 +0000132 int arg_count) {
133 UNIMPLEMENTED_MIPS();
134}
135
136
Steve Block44f0eee2011-05-26 01:26:41 +0100137void VirtualFrame::CallLoadIC(Handle<String> name, RelocInfo::Mode mode) {
138 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000139}
140
141
Steve Block44f0eee2011-05-26 01:26:41 +0100142void VirtualFrame::CallStoreIC(Handle<String> name, bool is_contextual) {
143 UNIMPLEMENTED_MIPS();
144}
145
146
147void VirtualFrame::CallKeyedLoadIC() {
148 UNIMPLEMENTED_MIPS();
149}
150
151
152void VirtualFrame::CallKeyedStoreIC() {
Andrei Popescu31002712010-02-23 13:46:05 +0000153 UNIMPLEMENTED_MIPS();
154}
155
156
157void VirtualFrame::CallCodeObject(Handle<Code> code,
158 RelocInfo::Mode rmode,
Steve Block44f0eee2011-05-26 01:26:41 +0100159 int dropped_args) {
Andrei Popescu31002712010-02-23 13:46:05 +0000160 UNIMPLEMENTED_MIPS();
161}
162
163
Steve Block44f0eee2011-05-26 01:26:41 +0100164// NO_TOS_REGISTERS, A0_TOS, A1_TOS, A1_A0_TOS, A0_A1_TOS.
165const bool VirtualFrame::kA0InUse[TOS_STATES] =
166 { false, true, false, true, true };
167const bool VirtualFrame::kA1InUse[TOS_STATES] =
168 { false, false, true, true, true };
169const int VirtualFrame::kVirtualElements[TOS_STATES] =
170 { 0, 1, 1, 2, 2 };
171const Register VirtualFrame::kTopRegister[TOS_STATES] =
172 { a0, a0, a1, a1, a0 };
173const Register VirtualFrame::kBottomRegister[TOS_STATES] =
174 { a0, a0, a1, a0, a1 };
175const Register VirtualFrame::kAllocatedRegisters[
176 VirtualFrame::kNumberOfAllocatedRegisters] = { a2, a3, t0, t1, t2 };
177// Popping is done by the transition implied by kStateAfterPop. Of course if
178// there were no stack slots allocated to registers then the physical SP must
179// be adjusted.
180const VirtualFrame::TopOfStack VirtualFrame::kStateAfterPop[TOS_STATES] =
181 { NO_TOS_REGISTERS, NO_TOS_REGISTERS, NO_TOS_REGISTERS, A0_TOS, A1_TOS };
182// Pushing is done by the transition implied by kStateAfterPush. Of course if
183// the maximum number of registers was already allocated to the top of stack
184// slots then one register must be physically pushed onto the stack.
185const VirtualFrame::TopOfStack VirtualFrame::kStateAfterPush[TOS_STATES] =
186 { A0_TOS, A1_A0_TOS, A0_A1_TOS, A0_A1_TOS, A1_A0_TOS };
187
188
Andrei Popescu31002712010-02-23 13:46:05 +0000189void VirtualFrame::Drop(int count) {
Andrei Popescu31002712010-02-23 13:46:05 +0000190 UNIMPLEMENTED_MIPS();
191}
192
193
Steve Block44f0eee2011-05-26 01:26:41 +0100194void VirtualFrame::Pop() {
Andrei Popescu31002712010-02-23 13:46:05 +0000195 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000196}
197
198
199void VirtualFrame::EmitPop(Register reg) {
Steve Block44f0eee2011-05-26 01:26:41 +0100200 UNIMPLEMENTED_MIPS();
201}
202
203
204void VirtualFrame::SpillAllButCopyTOSToA0() {
205 UNIMPLEMENTED_MIPS();
206}
207
208
209void VirtualFrame::SpillAllButCopyTOSToA1() {
210 UNIMPLEMENTED_MIPS();
211}
212
213
214void VirtualFrame::SpillAllButCopyTOSToA1A0() {
215 UNIMPLEMENTED_MIPS();
216}
217
218
219Register VirtualFrame::Peek() {
220 UNIMPLEMENTED_MIPS();
221 return no_reg;
222}
223
224
225Register VirtualFrame::Peek2() {
226 UNIMPLEMENTED_MIPS();
227 return no_reg;
228}
229
230
231void VirtualFrame::Dup() {
232 UNIMPLEMENTED_MIPS();
233}
234
235
236void VirtualFrame::Dup2() {
237 UNIMPLEMENTED_MIPS();
238}
239
240
241Register VirtualFrame::PopToRegister(Register but_not_to_this_one) {
242 UNIMPLEMENTED_MIPS();
243 return no_reg;
244}
245
246
247void VirtualFrame::EnsureOneFreeTOSRegister() {
248 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000249}
250
Steve Block6ded16b2010-05-10 14:33:55 +0100251
Andrei Popescu31002712010-02-23 13:46:05 +0000252void VirtualFrame::EmitMultiPop(RegList regs) {
Steve Block44f0eee2011-05-26 01:26:41 +0100253 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000254}
255
256
Steve Block44f0eee2011-05-26 01:26:41 +0100257void VirtualFrame::EmitPush(Register reg, TypeInfo info) {
258 UNIMPLEMENTED_MIPS();
259}
260
261
262void VirtualFrame::SetElementAt(Register reg, int this_far_down) {
263 UNIMPLEMENTED_MIPS();
264}
265
266
267Register VirtualFrame::GetTOSRegister() {
268 UNIMPLEMENTED_MIPS();
269 return no_reg;
270}
271
272
273void VirtualFrame::EmitPush(Operand operand, TypeInfo info) {
274 UNIMPLEMENTED_MIPS();
275}
276
277
278void VirtualFrame::EmitPush(MemOperand operand, TypeInfo info) {
279 UNIMPLEMENTED_MIPS();
280}
281
282
283void VirtualFrame::EmitPushRoot(Heap::RootListIndex index) {
284 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000285}
286
Steve Block6ded16b2010-05-10 14:33:55 +0100287
Andrei Popescu31002712010-02-23 13:46:05 +0000288void VirtualFrame::EmitMultiPush(RegList regs) {
Andrei Popescu31002712010-02-23 13:46:05 +0000289 UNIMPLEMENTED_MIPS();
290}
291
Steve Block44f0eee2011-05-26 01:26:41 +0100292
293void VirtualFrame::EmitMultiPushReversed(RegList regs) {
294 UNIMPLEMENTED_MIPS();
295}
296
297
298void VirtualFrame::SpillAll() {
299 UNIMPLEMENTED_MIPS();
300}
301
302
Andrei Popescu31002712010-02-23 13:46:05 +0000303#undef __
304
305} } // namespace v8::internal
306
Leon Clarkef7060e22010-06-03 12:02:55 +0100307#endif // V8_TARGET_ARCH_MIPS