| 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 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 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2064 __ Move(load_receiver, v0); | 2064 __ Move(load_receiver, v0); |
| 2065 | 2065 |
| 2066 __ push(load_receiver); // save result | 2066 __ push(load_receiver); // save result |
| 2067 __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done" | 2067 __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done" |
| 2068 __ li(LoadDescriptor::SlotRegister(), | 2068 __ li(LoadDescriptor::SlotRegister(), |
| 2069 Operand(SmiFromSlot(expr->DoneFeedbackSlot()))); | 2069 Operand(SmiFromSlot(expr->DoneFeedbackSlot()))); |
| 2070 CallLoadIC(NOT_INSIDE_TYPEOF); // v0=result.done | 2070 CallLoadIC(NOT_INSIDE_TYPEOF); // v0=result.done |
| 2071 __ mov(a0, v0); | 2071 __ mov(a0, v0); |
| 2072 Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate()); | 2072 Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate()); |
| 2073 CallIC(bool_ic); | 2073 CallIC(bool_ic); |
| 2074 __ Branch(&l_try, eq, v0, Operand(zero_reg)); | 2074 __ LoadRoot(at, Heap::kTrueValueRootIndex); |
| 2075 __ Branch(&l_try, ne, result_register(), Operand(at)); |
| 2075 | 2076 |
| 2076 // result.value | 2077 // result.value |
| 2077 __ pop(load_receiver); // result | 2078 __ pop(load_receiver); // result |
| 2078 __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value" | 2079 __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value" |
| 2079 __ li(LoadDescriptor::SlotRegister(), | 2080 __ li(LoadDescriptor::SlotRegister(), |
| 2080 Operand(SmiFromSlot(expr->ValueFeedbackSlot()))); | 2081 Operand(SmiFromSlot(expr->ValueFeedbackSlot()))); |
| 2081 CallLoadIC(NOT_INSIDE_TYPEOF); // v0=result.value | 2082 CallLoadIC(NOT_INSIDE_TYPEOF); // v0=result.value |
| 2082 context()->DropAndPlug(2, v0); // drop iter and g | 2083 context()->DropAndPlug(2, v0); // drop iter and g |
| 2083 break; | 2084 break; |
| 2084 } | 2085 } |
| (...skipping 2853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4938 reinterpret_cast<uint32_t>( | 4939 reinterpret_cast<uint32_t>( |
| 4939 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4940 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4940 return OSR_AFTER_STACK_CHECK; | 4941 return OSR_AFTER_STACK_CHECK; |
| 4941 } | 4942 } |
| 4942 | 4943 |
| 4943 | 4944 |
| 4944 } // namespace internal | 4945 } // namespace internal |
| 4945 } // namespace v8 | 4946 } // namespace v8 |
| 4946 | 4947 |
| 4947 #endif // V8_TARGET_ARCH_MIPS | 4948 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |