| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 14 matching lines...) Expand all Loading... |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 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. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 | 28 |
| 29 | 29 |
| 30 #include "v8.h" | 30 #include "v8.h" |
| 31 | 31 |
| 32 #if defined(V8_TARGET_ARCH_MIPS) | 32 #if defined(V8_TARGET_ARCH_MIPS) |
| 33 | 33 |
| 34 #include "codegen-inl.h" | 34 #include "codegen-inl.h" |
| 35 #include "code-stubs.h" |
| 35 #include "ic-inl.h" | 36 #include "ic-inl.h" |
| 36 #include "runtime.h" | 37 #include "runtime.h" |
| 37 #include "stub-cache.h" | 38 #include "stub-cache.h" |
| 38 | 39 |
| 39 namespace v8 { | 40 namespace v8 { |
| 40 namespace internal { | 41 namespace internal { |
| 41 | 42 |
| 42 | 43 |
| 43 // ---------------------------------------------------------------------------- | 44 // ---------------------------------------------------------------------------- |
| 44 // Static IC stub generators. | 45 // Static IC stub generators. |
| 45 // | 46 // |
| 46 | 47 |
| 47 #define __ ACCESS_MASM(masm) | 48 #define __ ACCESS_MASM(masm) |
| 48 | 49 |
| 49 | 50 |
| 50 void LoadIC::GenerateArrayLength(MacroAssembler* masm) { | 51 void LoadIC::GenerateArrayLength(MacroAssembler* masm) { |
| 51 UNIMPLEMENTED_MIPS(); | 52 UNIMPLEMENTED_MIPS(); |
| 52 } | 53 } |
| 53 | 54 |
| 54 | 55 |
| 55 void LoadIC::GenerateStringLength(MacroAssembler* masm) { | 56 void LoadIC::GenerateStringLength(MacroAssembler* masm, bool support_wrappers) { |
| 56 UNIMPLEMENTED_MIPS(); | 57 UNIMPLEMENTED_MIPS(); |
| 57 } | 58 } |
| 58 | 59 |
| 59 | 60 |
| 60 void LoadIC::GenerateFunctionPrototype(MacroAssembler* masm) { | 61 void LoadIC::GenerateFunctionPrototype(MacroAssembler* masm) { |
| 61 UNIMPLEMENTED_MIPS(); | 62 UNIMPLEMENTED_MIPS(); |
| 62 } | 63 } |
| 63 | 64 |
| 64 | 65 |
| 65 // Defined in ic.cc. | 66 // Defined in ic.cc. |
| 66 Object* CallIC_Miss(Arguments args); | 67 Object* CallIC_Miss(Arguments args); |
| 67 | 68 |
| 69 |
| 70 void CallIC::GenerateMiss(MacroAssembler* masm, int argc) { |
| 71 UNIMPLEMENTED_MIPS(); |
| 72 } |
| 73 |
| 74 |
| 68 void CallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) { | 75 void CallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) { |
| 69 UNIMPLEMENTED_MIPS(); | 76 UNIMPLEMENTED_MIPS(); |
| 70 } | 77 } |
| 71 | 78 |
| 72 | 79 |
| 73 void CallIC::GenerateNormal(MacroAssembler* masm, int argc) { | 80 void CallIC::GenerateNormal(MacroAssembler* masm, int argc) { |
| 74 UNIMPLEMENTED_MIPS(); | 81 UNIMPLEMENTED_MIPS(); |
| 75 } | 82 } |
| 76 | 83 |
| 77 void CallIC::GenerateMiss(MacroAssembler* masm, int argc) { | 84 |
| 85 void KeyedCallIC::GenerateMiss(MacroAssembler* masm, int argc) { |
| 78 UNIMPLEMENTED_MIPS(); | 86 UNIMPLEMENTED_MIPS(); |
| 79 // Registers: | 87 } |
| 80 // a2: name | |
| 81 // ra: return address | |
| 82 | 88 |
| 83 // Get the receiver of the function from the stack. | |
| 84 __ lw(a3, MemOperand(sp, argc*kPointerSize)); | |
| 85 | 89 |
| 86 __ EnterInternalFrame(); | 90 void KeyedCallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) { |
| 91 UNIMPLEMENTED_MIPS(); |
| 92 } |
| 87 | 93 |
| 88 // Push the receiver and the name of the function. | |
| 89 __ MultiPush(a2.bit() | a3.bit()); | |
| 90 | 94 |
| 91 // Call the entry. | 95 void KeyedCallIC::GenerateNormal(MacroAssembler* masm, int argc) { |
| 92 __ li(a0, Operand(2)); | 96 UNIMPLEMENTED_MIPS(); |
| 93 __ li(a1, Operand(ExternalReference(IC_Utility(kCallIC_Miss)))); | 97 } |
| 94 | 98 |
| 95 CEntryStub stub(1); | |
| 96 __ CallStub(&stub); | |
| 97 | |
| 98 // Move result to r1 and leave the internal frame. | |
| 99 __ mov(a1, v0); | |
| 100 __ LeaveInternalFrame(); | |
| 101 | |
| 102 // Check if the receiver is a global object of some sort. | |
| 103 Label invoke, global; | |
| 104 __ lw(a2, MemOperand(sp, argc * kPointerSize)); | |
| 105 __ andi(t0, a2, kSmiTagMask); | |
| 106 __ Branch(eq, &invoke, t0, Operand(zero_reg)); | |
| 107 __ GetObjectType(a2, a3, a3); | |
| 108 __ Branch(eq, &global, a3, Operand(JS_GLOBAL_OBJECT_TYPE)); | |
| 109 __ Branch(ne, &invoke, a3, Operand(JS_BUILTINS_OBJECT_TYPE)); | |
| 110 | |
| 111 // Patch the receiver on the stack. | |
| 112 __ bind(&global); | |
| 113 __ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalReceiverOffset)); | |
| 114 __ sw(a2, MemOperand(sp, argc * kPointerSize)); | |
| 115 | |
| 116 // Invoke the function. | |
| 117 ParameterCount actual(argc); | |
| 118 __ bind(&invoke); | |
| 119 __ InvokeFunction(a1, actual, JUMP_FUNCTION); | |
| 120 } | |
| 121 | 99 |
| 122 // Defined in ic.cc. | 100 // Defined in ic.cc. |
| 123 Object* LoadIC_Miss(Arguments args); | 101 Object* LoadIC_Miss(Arguments args); |
| 124 | 102 |
| 125 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { | 103 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
| 126 UNIMPLEMENTED_MIPS(); | 104 UNIMPLEMENTED_MIPS(); |
| 127 } | 105 } |
| 128 | 106 |
| 129 | 107 |
| 130 void LoadIC::GenerateNormal(MacroAssembler* masm) { | 108 void LoadIC::GenerateNormal(MacroAssembler* masm) { |
| 131 UNIMPLEMENTED_MIPS(); | 109 UNIMPLEMENTED_MIPS(); |
| 132 } | 110 } |
| 133 | 111 |
| 134 | 112 |
| 135 void LoadIC::GenerateMiss(MacroAssembler* masm) { | 113 void LoadIC::GenerateMiss(MacroAssembler* masm) { |
| 136 UNIMPLEMENTED_MIPS(); | 114 UNIMPLEMENTED_MIPS(); |
| 137 } | 115 } |
| 138 | 116 |
| 139 | 117 |
| 140 void LoadIC::ClearInlinedVersion(Address address) {} | |
| 141 bool LoadIC::PatchInlinedLoad(Address address, Object* map, int offset) { | 118 bool LoadIC::PatchInlinedLoad(Address address, Object* map, int offset) { |
| 119 UNIMPLEMENTED_MIPS(); |
| 142 return false; | 120 return false; |
| 143 } | 121 } |
| 144 | 122 |
| 145 void KeyedLoadIC::ClearInlinedVersion(Address address) {} | 123 |
| 146 bool KeyedLoadIC::PatchInlinedLoad(Address address, Object* map) { | 124 bool LoadIC::PatchInlinedContextualLoad(Address address, |
| 125 Object* map, |
| 126 Object* cell, |
| 127 bool is_dont_delete) { |
| 128 UNIMPLEMENTED_MIPS(); |
| 147 return false; | 129 return false; |
| 148 } | 130 } |
| 149 | 131 |
| 150 void KeyedStoreIC::ClearInlinedVersion(Address address) {} | 132 |
| 151 void KeyedStoreIC::RestoreInlinedVersion(Address address) {} | 133 bool StoreIC::PatchInlinedStore(Address address, Object* map, int offset) { |
| 152 bool KeyedStoreIC::PatchInlinedStore(Address address, Object* map) { | 134 UNIMPLEMENTED_MIPS(); |
| 153 return false; | 135 return false; |
| 154 } | 136 } |
| 155 | 137 |
| 138 |
| 139 bool KeyedLoadIC::PatchInlinedLoad(Address address, Object* map) { |
| 140 UNIMPLEMENTED_MIPS(); |
| 141 return false; |
| 142 } |
| 143 |
| 144 |
| 145 bool KeyedStoreIC::PatchInlinedStore(Address address, Object* map) { |
| 146 UNIMPLEMENTED_MIPS(); |
| 147 return false; |
| 148 } |
| 149 |
| 156 | 150 |
| 157 Object* KeyedLoadIC_Miss(Arguments args); | 151 Object* KeyedLoadIC_Miss(Arguments args); |
| 158 | 152 |
| 159 | 153 |
| 160 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { | 154 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { |
| 161 UNIMPLEMENTED_MIPS(); | 155 UNIMPLEMENTED_MIPS(); |
| 162 } | 156 } |
| 163 | 157 |
| 164 | 158 |
| 159 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { |
| 160 UNIMPLEMENTED_MIPS(); |
| 161 } |
| 162 |
| 163 |
| 165 void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) { | 164 void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) { |
| 166 UNIMPLEMENTED_MIPS(); | 165 UNIMPLEMENTED_MIPS(); |
| 167 } | 166 } |
| 168 | 167 |
| 169 | 168 |
| 170 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { | 169 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { |
| 171 UNIMPLEMENTED_MIPS(); | 170 UNIMPLEMENTED_MIPS(); |
| 172 } | 171 } |
| 173 | 172 |
| 174 | 173 |
| 175 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) { | 174 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, |
| 175 StrictModeFlag strict_mode) { |
| 176 UNIMPLEMENTED_MIPS(); | 176 UNIMPLEMENTED_MIPS(); |
| 177 } | 177 } |
| 178 | 178 |
| 179 |
| 180 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, |
| 181 StrictModeFlag strict_mode) { |
| 182 UNIMPLEMENTED_MIPS(); |
| 183 } |
| 184 |
| 179 | 185 |
| 180 void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { | 186 void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { |
| 181 UNIMPLEMENTED_MIPS(); | 187 UNIMPLEMENTED_MIPS(); |
| 182 } | 188 } |
| 183 | 189 |
| 184 | 190 |
| 185 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { | 191 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { |
| 186 UNIMPLEMENTED_MIPS(); | 192 UNIMPLEMENTED_MIPS(); |
| 187 } | 193 } |
| 188 | 194 |
| 189 | 195 |
| 190 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { | 196 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, |
| 197 StrictModeFlag strict_mode) { |
| 191 UNIMPLEMENTED_MIPS(); | 198 UNIMPLEMENTED_MIPS(); |
| 192 } | 199 } |
| 193 | 200 |
| 194 | 201 |
| 195 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 202 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
| 196 UNIMPLEMENTED_MIPS(); | 203 UNIMPLEMENTED_MIPS(); |
| 197 } | 204 } |
| 198 | 205 |
| 199 | 206 |
| 200 void StoreIC::GenerateArrayLength(MacroAssembler* masm) { | 207 void StoreIC::GenerateArrayLength(MacroAssembler* masm) { |
| 201 UNIMPLEMENTED_MIPS(); | 208 UNIMPLEMENTED_MIPS(); |
| 202 } | 209 } |
| 203 | 210 |
| 211 |
| 212 void StoreIC::GenerateNormal(MacroAssembler* masm) { |
| 213 UNIMPLEMENTED_MIPS(); |
| 214 } |
| 215 |
| 216 |
| 217 void StoreIC::GenerateGlobalProxy(MacroAssembler* masm, |
| 218 StrictModeFlag strict_mode) { |
| 219 UNIMPLEMENTED_MIPS(); |
| 220 } |
| 221 |
| 222 |
| 204 #undef __ | 223 #undef __ |
| 205 | 224 |
| 225 |
| 226 Condition CompareIC::ComputeCondition(Token::Value op) { |
| 227 UNIMPLEMENTED_MIPS(); |
| 228 return kNoCondition; |
| 229 } |
| 230 |
| 231 |
| 232 void CompareIC::UpdateCaches(Handle<Object> x, Handle<Object> y) { |
| 233 UNIMPLEMENTED_MIPS(); |
| 234 } |
| 235 |
| 236 |
| 237 void PatchInlinedSmiCode(Address address) { |
| 238 // Currently there is no smi inlining in the MIPS full code generator. |
| 239 } |
| 240 |
| 241 |
| 206 } } // namespace v8::internal | 242 } } // namespace v8::internal |
| 207 | 243 |
| 208 #endif // V8_TARGET_ARCH_MIPS | 244 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |