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 3993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4004 NilValue nil) { | 4004 NilValue nil) { |
4005 Label materialize_true, materialize_false; | 4005 Label materialize_true, materialize_false; |
4006 Label* if_true = NULL; | 4006 Label* if_true = NULL; |
4007 Label* if_false = NULL; | 4007 Label* if_false = NULL; |
4008 Label* fall_through = NULL; | 4008 Label* fall_through = NULL; |
4009 context()->PrepareTest(&materialize_true, &materialize_false, | 4009 context()->PrepareTest(&materialize_true, &materialize_false, |
4010 &if_true, &if_false, &fall_through); | 4010 &if_true, &if_false, &fall_through); |
4011 | 4011 |
4012 VisitForAccumulatorValue(sub_expr); | 4012 VisitForAccumulatorValue(sub_expr); |
4013 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 4013 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
4014 __ mov(a0, result_register()); | |
4015 if (expr->op() == Token::EQ_STRICT) { | 4014 if (expr->op() == Token::EQ_STRICT) { |
4016 Heap::RootListIndex nil_value = nil == kNullValue ? | 4015 Heap::RootListIndex nil_value = nil == kNullValue ? |
4017 Heap::kNullValueRootIndex : | 4016 Heap::kNullValueRootIndex : |
4018 Heap::kUndefinedValueRootIndex; | 4017 Heap::kUndefinedValueRootIndex; |
4019 __ LoadRoot(a1, nil_value); | 4018 __ LoadRoot(a1, nil_value); |
4020 Split(eq, a0, Operand(a1), if_true, if_false, fall_through); | 4019 Split(eq, v0, Operand(a1), if_true, if_false, fall_through); |
4021 } else { | 4020 } else { |
4022 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil); | 4021 __ JumpIfSmi(v0, if_false); |
4023 CallIC(ic, expr->CompareOperationFeedbackId()); | 4022 __ ld(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); |
4024 __ LoadRoot(a1, Heap::kTrueValueRootIndex); | 4023 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); |
4025 Split(eq, v0, Operand(a1), if_true, if_false, fall_through); | 4024 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); |
| 4025 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through); |
4026 } | 4026 } |
4027 context()->Plug(if_true, if_false); | 4027 context()->Plug(if_true, if_false); |
4028 } | 4028 } |
4029 | 4029 |
4030 | 4030 |
4031 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { | 4031 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { |
4032 __ ld(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 4032 __ ld(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
4033 context()->Plug(v0); | 4033 context()->Plug(v0); |
4034 } | 4034 } |
4035 | 4035 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4228 reinterpret_cast<uint64_t>( | 4228 reinterpret_cast<uint64_t>( |
4229 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4229 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4230 return OSR_AFTER_STACK_CHECK; | 4230 return OSR_AFTER_STACK_CHECK; |
4231 } | 4231 } |
4232 | 4232 |
4233 | 4233 |
4234 } // namespace internal | 4234 } // namespace internal |
4235 } // namespace v8 | 4235 } // namespace v8 |
4236 | 4236 |
4237 #endif // V8_TARGET_ARCH_MIPS64 | 4237 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |