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/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 2945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2956 break; | 2956 break; |
2957 case Token::kBIT_OR: | 2957 case Token::kBIT_OR: |
2958 // Operation part of combined smi check. | 2958 // Operation part of combined smi check. |
2959 break; | 2959 break; |
2960 case Token::kBIT_AND: | 2960 case Token::kBIT_AND: |
2961 __ and_(result, left, right); | 2961 __ and_(result, left, right); |
2962 break; | 2962 break; |
2963 case Token::kBIT_XOR: | 2963 case Token::kBIT_XOR: |
2964 __ xor_(result, left, right); | 2964 __ xor_(result, left, right); |
2965 break; | 2965 break; |
| 2966 case Token::kEQ: |
| 2967 case Token::kLT: |
| 2968 case Token::kLTE: |
| 2969 case Token::kGT: |
| 2970 case Token::kGTE: { |
| 2971 Label true_label, false_label, done; |
| 2972 BranchLabels labels = { &true_label, &false_label, &false_label }; |
| 2973 Condition true_condition = |
| 2974 EmitSmiComparisonOp(compiler, *locs(), op_kind()); |
| 2975 EmitBranchOnCondition(compiler, true_condition, labels); |
| 2976 __ Bind(&false_label); |
| 2977 __ LoadObject(result, Bool::False()); |
| 2978 __ b(&done); |
| 2979 __ Bind(&true_label); |
| 2980 __ LoadObject(result, Bool::True()); |
| 2981 __ Bind(&done); |
| 2982 break; |
| 2983 } |
2966 default: | 2984 default: |
2967 UNIMPLEMENTED(); | 2985 UNIMPLEMENTED(); |
2968 } | 2986 } |
2969 __ Bind(slow_path->exit_label()); | 2987 __ Bind(slow_path->exit_label()); |
2970 } | 2988 } |
2971 | 2989 |
2972 | 2990 |
2973 LocationSummary* BinarySmiOpInstr::MakeLocationSummary(Zone* zone, | 2991 LocationSummary* BinarySmiOpInstr::MakeLocationSummary(Zone* zone, |
2974 bool opt) const { | 2992 bool opt) const { |
2975 const intptr_t kNumInputs = 2; | 2993 const intptr_t kNumInputs = 2; |
(...skipping 2707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5683 1, | 5701 1, |
5684 locs()); | 5702 locs()); |
5685 __ lw(result, Address(SP, 1 * kWordSize)); | 5703 __ lw(result, Address(SP, 1 * kWordSize)); |
5686 __ addiu(SP, SP, Immediate(2 * kWordSize)); | 5704 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
5687 } | 5705 } |
5688 | 5706 |
5689 | 5707 |
5690 } // namespace dart | 5708 } // namespace dart |
5691 | 5709 |
5692 #endif // defined TARGET_ARCH_MIPS | 5710 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |