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 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1118 GenerateDartCall(deopt_id, | 1118 GenerateDartCall(deopt_id, |
1119 token_pos, | 1119 token_pos, |
1120 &StubCode::CallStaticFunctionLabel(), | 1120 &StubCode::CallStaticFunctionLabel(), |
1121 PcDescriptors::kFuncCall, | 1121 PcDescriptors::kFuncCall, |
1122 locs); | 1122 locs); |
1123 } | 1123 } |
1124 __ Drop(argument_count); | 1124 __ Drop(argument_count); |
1125 } | 1125 } |
1126 | 1126 |
1127 | 1127 |
| 1128 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg, |
| 1129 const Object& obj) { |
| 1130 if (obj.IsSmi() && (Smi::Cast(obj).Value() == 0)) { |
| 1131 __ testl(reg, reg); |
| 1132 } else { |
| 1133 __ CompareObject(reg, obj); |
| 1134 } |
| 1135 } |
| 1136 |
| 1137 |
1128 void FlowGraphCompiler::LoadDoubleOrSmiToXmm(XmmRegister result, | 1138 void FlowGraphCompiler::LoadDoubleOrSmiToXmm(XmmRegister result, |
1129 Register reg, | 1139 Register reg, |
1130 Register temp, | 1140 Register temp, |
1131 Label* not_double_or_smi) { | 1141 Label* not_double_or_smi) { |
1132 Label is_smi, done; | 1142 Label is_smi, done; |
1133 __ testl(reg, Immediate(kSmiTagMask)); | 1143 __ testl(reg, Immediate(kSmiTagMask)); |
1134 __ j(ZERO, &is_smi); | 1144 __ j(ZERO, &is_smi); |
1135 __ CompareClassId(reg, kDoubleCid, temp); | 1145 __ CompareClassId(reg, kDoubleCid, temp); |
1136 __ j(NOT_EQUAL, not_double_or_smi); | 1146 __ j(NOT_EQUAL, not_double_or_smi); |
1137 __ movsd(result, FieldAddress(reg, Double::value_offset())); | 1147 __ movsd(result, FieldAddress(reg, Double::value_offset())); |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1367 __ popl(ECX); | 1377 __ popl(ECX); |
1368 __ popl(EAX); | 1378 __ popl(EAX); |
1369 } | 1379 } |
1370 | 1380 |
1371 | 1381 |
1372 #undef __ | 1382 #undef __ |
1373 | 1383 |
1374 } // namespace dart | 1384 } // namespace dart |
1375 | 1385 |
1376 #endif // defined TARGET_ARCH_IA32 | 1386 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |