| 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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 } | 666 } |
| 667 | 667 |
| 668 | 668 |
| 669 void FullCodeGenerator::DoTest(Expression* condition, | 669 void FullCodeGenerator::DoTest(Expression* condition, |
| 670 Label* if_true, | 670 Label* if_true, |
| 671 Label* if_false, | 671 Label* if_false, |
| 672 Label* fall_through) { | 672 Label* fall_through) { |
| 673 __ mov(a0, result_register()); | 673 __ mov(a0, result_register()); |
| 674 Handle<Code> ic = ToBooleanStub::GetUninitialized(isolate()); | 674 Handle<Code> ic = ToBooleanStub::GetUninitialized(isolate()); |
| 675 CallIC(ic, condition->test_id()); | 675 CallIC(ic, condition->test_id()); |
| 676 __ mov(at, zero_reg); | 676 __ LoadRoot(at, Heap::kTrueValueRootIndex); |
| 677 Split(ne, v0, Operand(at), if_true, if_false, fall_through); | 677 Split(eq, result_register(), Operand(at), if_true, if_false, fall_through); |
| 678 } | 678 } |
| 679 | 679 |
| 680 | 680 |
| 681 void FullCodeGenerator::Split(Condition cc, | 681 void FullCodeGenerator::Split(Condition cc, |
| 682 Register lhs, | 682 Register lhs, |
| 683 const Operand& rhs, | 683 const Operand& rhs, |
| 684 Label* if_true, | 684 Label* if_true, |
| 685 Label* if_false, | 685 Label* if_false, |
| 686 Label* fall_through) { | 686 Label* fall_through) { |
| 687 if (if_false == fall_through) { | 687 if (if_false == fall_through) { |
| (...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2062 __ Move(load_receiver, v0); | 2062 __ Move(load_receiver, v0); |
| 2063 | 2063 |
| 2064 __ push(load_receiver); // save result | 2064 __ push(load_receiver); // save result |
| 2065 __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done" | 2065 __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done" |
| 2066 __ li(LoadDescriptor::SlotRegister(), | 2066 __ li(LoadDescriptor::SlotRegister(), |
| 2067 Operand(SmiFromSlot(expr->DoneFeedbackSlot()))); | 2067 Operand(SmiFromSlot(expr->DoneFeedbackSlot()))); |
| 2068 CallLoadIC(NOT_INSIDE_TYPEOF); // v0=result.done | 2068 CallLoadIC(NOT_INSIDE_TYPEOF); // v0=result.done |
| 2069 __ mov(a0, v0); | 2069 __ mov(a0, v0); |
| 2070 Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate()); | 2070 Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate()); |
| 2071 CallIC(bool_ic); | 2071 CallIC(bool_ic); |
| 2072 __ Branch(&l_try, eq, v0, Operand(zero_reg)); | 2072 __ LoadRoot(at, Heap::kTrueValueRootIndex); |
| 2073 __ Branch(&l_try, ne, result_register(), Operand(at)); |
| 2073 | 2074 |
| 2074 // result.value | 2075 // result.value |
| 2075 __ pop(load_receiver); // result | 2076 __ pop(load_receiver); // result |
| 2076 __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value" | 2077 __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value" |
| 2077 __ li(LoadDescriptor::SlotRegister(), | 2078 __ li(LoadDescriptor::SlotRegister(), |
| 2078 Operand(SmiFromSlot(expr->ValueFeedbackSlot()))); | 2079 Operand(SmiFromSlot(expr->ValueFeedbackSlot()))); |
| 2079 CallLoadIC(NOT_INSIDE_TYPEOF); // v0=result.value | 2080 CallLoadIC(NOT_INSIDE_TYPEOF); // v0=result.value |
| 2080 context()->DropAndPlug(2, v0); // drop iter and g | 2081 context()->DropAndPlug(2, v0); // drop iter and g |
| 2081 break; | 2082 break; |
| 2082 } | 2083 } |
| (...skipping 2863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4946 reinterpret_cast<uint64_t>( | 4947 reinterpret_cast<uint64_t>( |
| 4947 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4948 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4948 return OSR_AFTER_STACK_CHECK; | 4949 return OSR_AFTER_STACK_CHECK; |
| 4949 } | 4950 } |
| 4950 | 4951 |
| 4951 | 4952 |
| 4952 } // namespace internal | 4953 } // namespace internal |
| 4953 } // namespace v8 | 4954 } // namespace v8 |
| 4954 | 4955 |
| 4955 #endif // V8_TARGET_ARCH_MIPS64 | 4956 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |