| 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 __ LoadObject(V0, Bool::True()); | 696 __ LoadObject(V0, Bool::True()); |
| 697 __ Ret(); | 697 __ Ret(); |
| 698 | 698 |
| 699 // At least one of the arguments was not Smi. | 699 // At least one of the arguments was not Smi. |
| 700 Label receiver_not_smi; | 700 Label receiver_not_smi; |
| 701 __ Bind(&check_for_mint); | 701 __ Bind(&check_for_mint); |
| 702 | 702 |
| 703 __ andi(CMPRES1, T1, Immediate(kSmiTagMask)); | 703 __ andi(CMPRES1, T1, Immediate(kSmiTagMask)); |
| 704 __ bne(CMPRES1, ZR, &receiver_not_smi); // Check receiver. | 704 __ bne(CMPRES1, ZR, &receiver_not_smi); // Check receiver. |
| 705 | 705 |
| 706 // Left (receiver) is Smi, return false if right is not Double. | 706 // Left (receiver) is Smi, return false if right is not Double or Pixels. |
| 707 // Note that an instance of Mint or Bigint never contains a value that can be | 707 // Note that an instance of Mint or Bigint never contains a value that can be |
| 708 // represented by Smi. | 708 // represented by Smi. |
| 709 | 709 |
| 710 __ LoadClassId(CMPRES1, T0); | 710 __ LoadClassId(CMPRES1, T0); |
| 711 __ BranchEqual(CMPRES1, Immediate(kDoubleCid), &fall_through); | 711 __ BranchEqual(CMPRES1, Immediate(kDoubleCid), &fall_through); |
| 712 __ BranchEqual(CMPRES1, Immediate(kPixelsCid), &fall_through); |
| 712 __ LoadObject(V0, Bool::False()); // Smi == Mint -> false. | 713 __ LoadObject(V0, Bool::False()); // Smi == Mint -> false. |
| 713 __ Ret(); | 714 __ Ret(); |
| 714 | 715 |
| 715 __ Bind(&receiver_not_smi); | 716 __ Bind(&receiver_not_smi); |
| 716 // T1:: receiver. | 717 // T1:: receiver. |
| 717 | 718 |
| 718 __ LoadClassId(CMPRES1, T1); | 719 __ LoadClassId(CMPRES1, T1); |
| 719 __ BranchNotEqual(CMPRES1, Immediate(kMintCid), &fall_through); | 720 __ BranchNotEqual(CMPRES1, Immediate(kMintCid), &fall_through); |
| 720 // Receiver is Mint, return false if right is Smi. | 721 // Receiver is Mint, return false if right is Smi. |
| 721 __ andi(CMPRES1, T0, Immediate(kSmiTagMask)); | 722 __ andi(CMPRES1, T0, Immediate(kSmiTagMask)); |
| (...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2237 __ lw(T0, Address(V0, TimelineStream::enabled_offset())); | 2238 __ lw(T0, Address(V0, TimelineStream::enabled_offset())); |
| 2238 __ LoadObject(V0, Bool::True()); | 2239 __ LoadObject(V0, Bool::True()); |
| 2239 __ LoadObject(V1, Bool::False()); | 2240 __ LoadObject(V1, Bool::False()); |
| 2240 __ Ret(); | 2241 __ Ret(); |
| 2241 __ delay_slot()->movz(V0, V1, T0); // V0 = (T0 == 0) ? V1 : V0. | 2242 __ delay_slot()->movz(V0, V1, T0); // V0 = (T0 == 0) ? V1 : V0. |
| 2242 } | 2243 } |
| 2243 | 2244 |
| 2244 } // namespace dart | 2245 } // namespace dart |
| 2245 | 2246 |
| 2246 #endif // defined TARGET_ARCH_MIPS | 2247 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |