| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 7 | 7 |
| 8 #include "vm/intrinsifier.h" | 8 #include "vm/intrinsifier.h" |
| 9 | 9 |
| 10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 __ Ret(); | 788 __ Ret(); |
| 789 __ delay_slot()->SmiTag(V0); | 789 __ delay_slot()->SmiTag(V0); |
| 790 __ Bind(&fall_through); | 790 __ Bind(&fall_through); |
| 791 return false; | 791 return false; |
| 792 } | 792 } |
| 793 | 793 |
| 794 | 794 |
| 795 bool Intrinsifier::Integer_negate(Assembler* assembler) { | 795 bool Intrinsifier::Integer_negate(Assembler* assembler) { |
| 796 Label fall_through; | 796 Label fall_through; |
| 797 | 797 |
| 798 __ lw(V0, Address(SP, + 0 * kWordSize)); // Grabs first argument. | 798 __ lw(T0, Address(SP, + 0 * kWordSize)); // Grabs first argument. |
| 799 __ andi(CMPRES, V0, Immediate(kSmiTagMask)); // Test for Smi. | 799 __ andi(CMPRES, T0, Immediate(kSmiTagMask)); // Test for Smi. |
| 800 __ bne(CMPRES, ZR, &fall_through); // Fall through if not a Smi. | 800 __ bne(CMPRES, ZR, &fall_through); // Fall through if not a Smi. |
| 801 __ SubuDetectOverflow(V0, ZR, T0, CMPRES); |
| 802 __ bltz(CMPRES, &fall_through); // There was overflow. |
| 801 __ Ret(); | 803 __ Ret(); |
| 802 __ delay_slot()->subu(V0, ZR, V0); | |
| 803 __ Bind(&fall_through); | 804 __ Bind(&fall_through); |
| 804 return false; | 805 return false; |
| 805 } | 806 } |
| 806 | 807 |
| 807 | 808 |
| 808 bool Intrinsifier::Integer_bitAndFromInteger(Assembler* assembler) { | 809 bool Intrinsifier::Integer_bitAndFromInteger(Assembler* assembler) { |
| 809 Label fall_through; | 810 Label fall_through; |
| 810 | 811 |
| 811 TestBothArgumentsSmis(assembler, &fall_through); // Checks two smis. | 812 TestBothArgumentsSmis(assembler, &fall_through); // Checks two smis. |
| 812 __ Ret(); | 813 __ Ret(); |
| (...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1769 __ Bind(&ok); | 1770 __ Bind(&ok); |
| 1770 __ Ret(); | 1771 __ Ret(); |
| 1771 | 1772 |
| 1772 __ Bind(&fall_through); | 1773 __ Bind(&fall_through); |
| 1773 return false; | 1774 return false; |
| 1774 } | 1775 } |
| 1775 | 1776 |
| 1776 } // namespace dart | 1777 } // namespace dart |
| 1777 | 1778 |
| 1778 #endif // defined TARGET_ARCH_MIPS | 1779 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |