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 #if V8_TARGET_ARCH_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
8 // | 8 // |
9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
(...skipping 3177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3188 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() == | 3188 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() == |
3189 expr->CallNewFeedbackSlot().ToInt() + 1); | 3189 expr->CallNewFeedbackSlot().ToInt() + 1); |
3190 } | 3190 } |
3191 | 3191 |
3192 __ li(a2, FeedbackVector()); | 3192 __ li(a2, FeedbackVector()); |
3193 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); | 3193 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); |
3194 | 3194 |
3195 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); | 3195 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); |
3196 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3196 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
3197 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 3197 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
| 3198 // Restore context register. |
| 3199 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
3198 context()->Plug(v0); | 3200 context()->Plug(v0); |
3199 } | 3201 } |
3200 | 3202 |
3201 | 3203 |
3202 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 3204 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
3203 SuperCallReference* super_call_ref = | 3205 SuperCallReference* super_call_ref = |
3204 expr->expression()->AsSuperCallReference(); | 3206 expr->expression()->AsSuperCallReference(); |
3205 DCHECK_NOT_NULL(super_call_ref); | 3207 DCHECK_NOT_NULL(super_call_ref); |
3206 | 3208 |
3207 EmitLoadSuperConstructor(super_call_ref); | 3209 EmitLoadSuperConstructor(super_call_ref); |
(...skipping 29 matching lines...) Expand all Loading... |
3237 } | 3239 } |
3238 | 3240 |
3239 __ li(a2, FeedbackVector()); | 3241 __ li(a2, FeedbackVector()); |
3240 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); | 3242 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); |
3241 | 3243 |
3242 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); | 3244 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); |
3243 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3245 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
3244 | 3246 |
3245 RecordJSReturnSite(expr); | 3247 RecordJSReturnSite(expr); |
3246 | 3248 |
| 3249 // Restore context register. |
| 3250 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
3247 context()->Plug(v0); | 3251 context()->Plug(v0); |
3248 } | 3252 } |
3249 | 3253 |
3250 | 3254 |
3251 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { | 3255 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { |
3252 ZoneList<Expression*>* args = expr->arguments(); | 3256 ZoneList<Expression*>* args = expr->arguments(); |
3253 DCHECK(args->length() == 1); | 3257 DCHECK(args->length() == 1); |
3254 | 3258 |
3255 VisitForAccumulatorValue(args->at(0)); | 3259 VisitForAccumulatorValue(args->at(0)); |
3256 | 3260 |
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4173 | 4177 |
4174 __ bind(&args_set_up); | 4178 __ bind(&args_set_up); |
4175 __ sll(at, a0, kPointerSizeLog2); | 4179 __ sll(at, a0, kPointerSizeLog2); |
4176 __ Addu(at, at, Operand(sp)); | 4180 __ Addu(at, at, Operand(sp)); |
4177 __ lw(a1, MemOperand(at, 0)); | 4181 __ lw(a1, MemOperand(at, 0)); |
4178 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); | 4182 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); |
4179 | 4183 |
4180 CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL); | 4184 CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL); |
4181 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 4185 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
4182 | 4186 |
4183 __ Drop(1); | 4187 // Restore context register. |
| 4188 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
4184 | 4189 |
4185 context()->Plug(result_register()); | 4190 context()->DropAndPlug(1, result_register()); |
4186 } | 4191 } |
4187 | 4192 |
4188 | 4193 |
4189 void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) { | 4194 void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) { |
4190 RegExpConstructResultStub stub(isolate()); | 4195 RegExpConstructResultStub stub(isolate()); |
4191 ZoneList<Expression*>* args = expr->arguments(); | 4196 ZoneList<Expression*>* args = expr->arguments(); |
4192 DCHECK(args->length() == 3); | 4197 DCHECK(args->length() == 3); |
4193 VisitForStackValue(args->at(0)); | 4198 VisitForStackValue(args->at(0)); |
4194 VisitForStackValue(args->at(1)); | 4199 VisitForStackValue(args->at(1)); |
4195 VisitForAccumulatorValue(args->at(2)); | 4200 VisitForAccumulatorValue(args->at(2)); |
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5331 reinterpret_cast<uint32_t>( | 5336 reinterpret_cast<uint32_t>( |
5332 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5337 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5333 return OSR_AFTER_STACK_CHECK; | 5338 return OSR_AFTER_STACK_CHECK; |
5334 } | 5339 } |
5335 | 5340 |
5336 | 5341 |
5337 } // namespace internal | 5342 } // namespace internal |
5338 } // namespace v8 | 5343 } // namespace v8 |
5339 | 5344 |
5340 #endif // V8_TARGET_ARCH_MIPS | 5345 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |