| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 Label* deopt) { | 967 Label* deopt) { |
| 968 Label ok; | 968 Label ok; |
| 969 ASSERT(class_ids[0] != kSmi); | 969 ASSERT(class_ids[0] != kSmi); |
| 970 __ testl(instance_reg, Immediate(kSmiTagMask)); | 970 __ testl(instance_reg, Immediate(kSmiTagMask)); |
| 971 __ j(ZERO, deopt); | 971 __ j(ZERO, deopt); |
| 972 Label is_ok; | 972 Label is_ok; |
| 973 bool use_near_jump = class_ids.length() < 5; | 973 bool use_near_jump = class_ids.length() < 5; |
| 974 __ LoadClassId(temp_reg, instance_reg); | 974 __ LoadClassId(temp_reg, instance_reg); |
| 975 for (intptr_t i = 0; i < class_ids.length(); i++) { | 975 for (intptr_t i = 0; i < class_ids.length(); i++) { |
| 976 __ cmpl(temp_reg, Immediate(class_ids[i])); | 976 __ cmpl(temp_reg, Immediate(class_ids[i])); |
| 977 if (i == class_ids.length() - 1) { | 977 if (i == (class_ids.length() - 1)) { |
| 978 __ j(NOT_EQUAL, deopt); | 978 __ j(NOT_EQUAL, deopt); |
| 979 } else { | 979 } else { |
| 980 if (use_near_jump) { | 980 if (use_near_jump) { |
| 981 __ j(EQUAL, &is_ok, Assembler::kNearJump); | 981 __ j(EQUAL, &is_ok, Assembler::kNearJump); |
| 982 } else { | 982 } else { |
| 983 __ j(EQUAL, &is_ok); | 983 __ j(EQUAL, &is_ok); |
| 984 } | 984 } |
| 985 } | 985 } |
| 986 } | 986 } |
| 987 __ Bind(&is_ok); | 987 __ Bind(&is_ok); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1006 __ cvtsi2sd(result, temp); | 1006 __ cvtsi2sd(result, temp); |
| 1007 __ Bind(&done); | 1007 __ Bind(&done); |
| 1008 } | 1008 } |
| 1009 | 1009 |
| 1010 | 1010 |
| 1011 #undef __ | 1011 #undef __ |
| 1012 | 1012 |
| 1013 } // namespace dart | 1013 } // namespace dart |
| 1014 | 1014 |
| 1015 #endif // defined TARGET_ARCH_IA32 | 1015 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |