| 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 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 3179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3190 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() == | 3190 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() == |
| 3191 expr->CallNewFeedbackSlot().ToInt() + 1); | 3191 expr->CallNewFeedbackSlot().ToInt() + 1); |
| 3192 } | 3192 } |
| 3193 | 3193 |
| 3194 __ li(a2, FeedbackVector()); | 3194 __ li(a2, FeedbackVector()); |
| 3195 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); | 3195 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); |
| 3196 | 3196 |
| 3197 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); | 3197 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); |
| 3198 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3198 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
| 3199 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 3199 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
| 3200 // Restore context register. |
| 3201 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 3200 context()->Plug(v0); | 3202 context()->Plug(v0); |
| 3201 } | 3203 } |
| 3202 | 3204 |
| 3203 | 3205 |
| 3204 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 3206 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
| 3205 SuperCallReference* super_call_ref = | 3207 SuperCallReference* super_call_ref = |
| 3206 expr->expression()->AsSuperCallReference(); | 3208 expr->expression()->AsSuperCallReference(); |
| 3207 DCHECK_NOT_NULL(super_call_ref); | 3209 DCHECK_NOT_NULL(super_call_ref); |
| 3208 | 3210 |
| 3209 EmitLoadSuperConstructor(super_call_ref); | 3211 EmitLoadSuperConstructor(super_call_ref); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 3239 } | 3241 } |
| 3240 | 3242 |
| 3241 __ li(a2, FeedbackVector()); | 3243 __ li(a2, FeedbackVector()); |
| 3242 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); | 3244 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); |
| 3243 | 3245 |
| 3244 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); | 3246 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); |
| 3245 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3247 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
| 3246 | 3248 |
| 3247 RecordJSReturnSite(expr); | 3249 RecordJSReturnSite(expr); |
| 3248 | 3250 |
| 3251 // Restore context register. |
| 3252 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 3249 context()->Plug(v0); | 3253 context()->Plug(v0); |
| 3250 } | 3254 } |
| 3251 | 3255 |
| 3252 | 3256 |
| 3253 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { | 3257 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { |
| 3254 ZoneList<Expression*>* args = expr->arguments(); | 3258 ZoneList<Expression*>* args = expr->arguments(); |
| 3255 DCHECK(args->length() == 1); | 3259 DCHECK(args->length() == 1); |
| 3256 | 3260 |
| 3257 VisitForAccumulatorValue(args->at(0)); | 3261 VisitForAccumulatorValue(args->at(0)); |
| 3258 | 3262 |
| (...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4177 | 4181 |
| 4178 __ bind(&args_set_up); | 4182 __ bind(&args_set_up); |
| 4179 __ dsll(at, a0, kPointerSizeLog2); | 4183 __ dsll(at, a0, kPointerSizeLog2); |
| 4180 __ Daddu(at, at, Operand(sp)); | 4184 __ Daddu(at, at, Operand(sp)); |
| 4181 __ ld(a1, MemOperand(at, 0)); | 4185 __ ld(a1, MemOperand(at, 0)); |
| 4182 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); | 4186 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); |
| 4183 | 4187 |
| 4184 CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL); | 4188 CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL); |
| 4185 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 4189 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
| 4186 | 4190 |
| 4187 __ Drop(1); | 4191 // Restore context register. |
| 4192 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 4188 | 4193 |
| 4189 context()->Plug(result_register()); | 4194 context()->DropAndPlug(1, result_register()); |
| 4190 } | 4195 } |
| 4191 | 4196 |
| 4192 | 4197 |
| 4193 void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) { | 4198 void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) { |
| 4194 RegExpConstructResultStub stub(isolate()); | 4199 RegExpConstructResultStub stub(isolate()); |
| 4195 ZoneList<Expression*>* args = expr->arguments(); | 4200 ZoneList<Expression*>* args = expr->arguments(); |
| 4196 DCHECK(args->length() == 3); | 4201 DCHECK(args->length() == 3); |
| 4197 VisitForStackValue(args->at(0)); | 4202 VisitForStackValue(args->at(0)); |
| 4198 VisitForStackValue(args->at(1)); | 4203 VisitForStackValue(args->at(1)); |
| 4199 VisitForAccumulatorValue(args->at(2)); | 4204 VisitForAccumulatorValue(args->at(2)); |
| (...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5338 reinterpret_cast<uint64_t>( | 5343 reinterpret_cast<uint64_t>( |
| 5339 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5344 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5340 return OSR_AFTER_STACK_CHECK; | 5345 return OSR_AFTER_STACK_CHECK; |
| 5341 } | 5346 } |
| 5342 | 5347 |
| 5343 | 5348 |
| 5344 } // namespace internal | 5349 } // namespace internal |
| 5345 } // namespace v8 | 5350 } // namespace v8 |
| 5346 | 5351 |
| 5347 #endif // V8_TARGET_ARCH_MIPS64 | 5352 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |