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 3262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3273 __ GetObjectType(v0, map, type_reg); | 3273 __ GetObjectType(v0, map, type_reg); |
3274 __ Subu(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE)); | 3274 __ Subu(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE)); |
3275 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3275 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
3276 Split(ls, type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE), | 3276 Split(ls, type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE), |
3277 if_true, if_false, fall_through); | 3277 if_true, if_false, fall_through); |
3278 | 3278 |
3279 context()->Plug(if_true, if_false); | 3279 context()->Plug(if_true, if_false); |
3280 } | 3280 } |
3281 | 3281 |
3282 | 3282 |
3283 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) { | |
3284 DCHECK(expr->arguments()->length() == 0); | |
3285 | |
3286 Label materialize_true, materialize_false; | |
3287 Label* if_true = NULL; | |
3288 Label* if_false = NULL; | |
3289 Label* fall_through = NULL; | |
3290 context()->PrepareTest(&materialize_true, &materialize_false, | |
3291 &if_true, &if_false, &fall_through); | |
3292 | |
3293 // Get the frame pointer for the calling frame. | |
3294 __ ld(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | |
3295 | |
3296 // Skip the arguments adaptor frame if it exists. | |
3297 Label check_frame_marker; | |
3298 __ ld(a1, MemOperand(a2, StandardFrameConstants::kContextOffset)); | |
3299 __ Branch(&check_frame_marker, ne, | |
3300 a1, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | |
3301 __ ld(a2, MemOperand(a2, StandardFrameConstants::kCallerFPOffset)); | |
3302 | |
3303 // Check the marker in the calling frame. | |
3304 __ bind(&check_frame_marker); | |
3305 __ ld(a1, MemOperand(a2, StandardFrameConstants::kMarkerOffset)); | |
3306 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
3307 Split(eq, a1, Operand(Smi::FromInt(StackFrame::CONSTRUCT)), | |
3308 if_true, if_false, fall_through); | |
3309 | |
3310 context()->Plug(if_true, if_false); | |
3311 } | |
3312 | |
3313 | |
3314 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { | 3283 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { |
3315 ZoneList<Expression*>* args = expr->arguments(); | 3284 ZoneList<Expression*>* args = expr->arguments(); |
3316 DCHECK(args->length() == 2); | 3285 DCHECK(args->length() == 2); |
3317 | 3286 |
3318 // Load the two objects into registers and perform the comparison. | 3287 // Load the two objects into registers and perform the comparison. |
3319 VisitForStackValue(args->at(0)); | 3288 VisitForStackValue(args->at(0)); |
3320 VisitForAccumulatorValue(args->at(1)); | 3289 VisitForAccumulatorValue(args->at(1)); |
3321 | 3290 |
3322 Label materialize_true, materialize_false; | 3291 Label materialize_true, materialize_false; |
3323 Label* if_true = NULL; | 3292 Label* if_true = NULL; |
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4977 reinterpret_cast<uint64_t>( | 4946 reinterpret_cast<uint64_t>( |
4978 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4947 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4979 return OSR_AFTER_STACK_CHECK; | 4948 return OSR_AFTER_STACK_CHECK; |
4980 } | 4949 } |
4981 | 4950 |
4982 | 4951 |
4983 } // namespace internal | 4952 } // namespace internal |
4984 } // namespace v8 | 4953 } // namespace v8 |
4985 | 4954 |
4986 #endif // V8_TARGET_ARCH_MIPS64 | 4955 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |