1 // 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 28 #include "v8.h" 29 30 #if defined(V8_TARGET_ARCH_MIPS) 31 32 #include "codegen-inl.h" 33 #include "register-allocator-inl.h" 34 #include "scopes.h" 35 #include "virtual-frame-inl.h" 36 37 namespace v8 { 38 namespace internal { 39 40 #define __ ACCESS_MASM(masm()) 41 42 void VirtualFrame::PopToA1A0() { 43 UNIMPLEMENTED_MIPS(); 44 } 45 46 47 void VirtualFrame::PopToA1() { 48 UNIMPLEMENTED_MIPS(); 49 } 50 51 52 void VirtualFrame::PopToA0() { 53 UNIMPLEMENTED_MIPS(); 54 } 55 56 57 void VirtualFrame::MergeTo(const VirtualFrame* expected, 58 Condition cond, 59 Register r1, 60 const Operand& r2) { 61 UNIMPLEMENTED_MIPS(); 62 } 63 64 65 void VirtualFrame::MergeTo(VirtualFrame* expected, 66 Condition cond, 67 Register r1, 68 const Operand& r2) { 69 UNIMPLEMENTED_MIPS(); 70 } 71 72 73 void VirtualFrame::MergeTOSTo( 74 VirtualFrame::TopOfStack expected_top_of_stack_state, 75 Condition cond, 76 Register r1, 77 const Operand& r2) { 78 UNIMPLEMENTED_MIPS(); 79 } 80 81 82 void VirtualFrame::Enter() { 83 UNIMPLEMENTED_MIPS(); 84 } 85 86 87 void VirtualFrame::Exit() { 88 UNIMPLEMENTED_MIPS(); 89 } 90 91 92 void VirtualFrame::AllocateStackSlots() { 93 UNIMPLEMENTED_MIPS(); 94 } 95 96 97 98 void VirtualFrame::PushReceiverSlotAddress() { 99 UNIMPLEMENTED_MIPS(); 100 } 101 102 103 void VirtualFrame::PushTryHandler(HandlerType type) { 104 UNIMPLEMENTED_MIPS(); 105 } 106 107 108 void VirtualFrame::CallJSFunction(int arg_count) { 109 UNIMPLEMENTED_MIPS(); 110 } 111 112 113 void VirtualFrame::CallRuntime(const Runtime::Function* f, int arg_count) { 114 UNIMPLEMENTED_MIPS(); 115 } 116 117 118 void VirtualFrame::CallRuntime(Runtime::FunctionId id, int arg_count) { 119 UNIMPLEMENTED_MIPS(); 120 } 121 122 123 #ifdef ENABLE_DEBUGGER_SUPPORT 124 void VirtualFrame::DebugBreak() { 125 UNIMPLEMENTED_MIPS(); 126 } 127 #endif 128 129 130 void VirtualFrame::InvokeBuiltin(Builtins::JavaScript id, 131 InvokeJSFlags flags, 132 int arg_count) { 133 UNIMPLEMENTED_MIPS(); 134 } 135 136 137 void VirtualFrame::CallLoadIC(Handle<String> name, RelocInfo::Mode mode) { 138 UNIMPLEMENTED_MIPS(); 139 } 140 141 142 void VirtualFrame::CallStoreIC(Handle<String> name, bool is_contextual) { 143 UNIMPLEMENTED_MIPS(); 144 } 145 146 147 void VirtualFrame::CallKeyedLoadIC() { 148 UNIMPLEMENTED_MIPS(); 149 } 150 151 152 void VirtualFrame::CallKeyedStoreIC() { 153 UNIMPLEMENTED_MIPS(); 154 } 155 156 157 void VirtualFrame::CallCodeObject(Handle<Code> code, 158 RelocInfo::Mode rmode, 159 int dropped_args) { 160 UNIMPLEMENTED_MIPS(); 161 } 162 163 164 // NO_TOS_REGISTERS, A0_TOS, A1_TOS, A1_A0_TOS, A0_A1_TOS. 165 const bool VirtualFrame::kA0InUse[TOS_STATES] = 166 { false, true, false, true, true }; 167 const bool VirtualFrame::kA1InUse[TOS_STATES] = 168 { false, false, true, true, true }; 169 const int VirtualFrame::kVirtualElements[TOS_STATES] = 170 { 0, 1, 1, 2, 2 }; 171 const Register VirtualFrame::kTopRegister[TOS_STATES] = 172 { a0, a0, a1, a1, a0 }; 173 const Register VirtualFrame::kBottomRegister[TOS_STATES] = 174 { a0, a0, a1, a0, a1 }; 175 const 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. 180 const 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. 185 const VirtualFrame::TopOfStack VirtualFrame::kStateAfterPush[TOS_STATES] = 186 { A0_TOS, A1_A0_TOS, A0_A1_TOS, A0_A1_TOS, A1_A0_TOS }; 187 188 189 void VirtualFrame::Drop(int count) { 190 UNIMPLEMENTED_MIPS(); 191 } 192 193 194 void VirtualFrame::Pop() { 195 UNIMPLEMENTED_MIPS(); 196 } 197 198 199 void VirtualFrame::EmitPop(Register reg) { 200 UNIMPLEMENTED_MIPS(); 201 } 202 203 204 void VirtualFrame::SpillAllButCopyTOSToA0() { 205 UNIMPLEMENTED_MIPS(); 206 } 207 208 209 void VirtualFrame::SpillAllButCopyTOSToA1() { 210 UNIMPLEMENTED_MIPS(); 211 } 212 213 214 void VirtualFrame::SpillAllButCopyTOSToA1A0() { 215 UNIMPLEMENTED_MIPS(); 216 } 217 218 219 Register VirtualFrame::Peek() { 220 UNIMPLEMENTED_MIPS(); 221 return no_reg; 222 } 223 224 225 Register VirtualFrame::Peek2() { 226 UNIMPLEMENTED_MIPS(); 227 return no_reg; 228 } 229 230 231 void VirtualFrame::Dup() { 232 UNIMPLEMENTED_MIPS(); 233 } 234 235 236 void VirtualFrame::Dup2() { 237 UNIMPLEMENTED_MIPS(); 238 } 239 240 241 Register VirtualFrame::PopToRegister(Register but_not_to_this_one) { 242 UNIMPLEMENTED_MIPS(); 243 return no_reg; 244 } 245 246 247 void VirtualFrame::EnsureOneFreeTOSRegister() { 248 UNIMPLEMENTED_MIPS(); 249 } 250 251 252 void VirtualFrame::EmitMultiPop(RegList regs) { 253 UNIMPLEMENTED_MIPS(); 254 } 255 256 257 void VirtualFrame::EmitPush(Register reg, TypeInfo info) { 258 UNIMPLEMENTED_MIPS(); 259 } 260 261 262 void VirtualFrame::SetElementAt(Register reg, int this_far_down) { 263 UNIMPLEMENTED_MIPS(); 264 } 265 266 267 Register VirtualFrame::GetTOSRegister() { 268 UNIMPLEMENTED_MIPS(); 269 return no_reg; 270 } 271 272 273 void VirtualFrame::EmitPush(Operand operand, TypeInfo info) { 274 UNIMPLEMENTED_MIPS(); 275 } 276 277 278 void VirtualFrame::EmitPush(MemOperand operand, TypeInfo info) { 279 UNIMPLEMENTED_MIPS(); 280 } 281 282 283 void VirtualFrame::EmitPushRoot(Heap::RootListIndex index) { 284 UNIMPLEMENTED_MIPS(); 285 } 286 287 288 void VirtualFrame::EmitMultiPush(RegList regs) { 289 UNIMPLEMENTED_MIPS(); 290 } 291 292 293 void VirtualFrame::EmitMultiPushReversed(RegList regs) { 294 UNIMPLEMENTED_MIPS(); 295 } 296 297 298 void VirtualFrame::SpillAll() { 299 UNIMPLEMENTED_MIPS(); 300 } 301 302 303 #undef __ 304 305 } } // namespace v8::internal 306 307 #endif // V8_TARGET_ARCH_MIPS 308