| 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_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/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 if (kNumTemps == 1) { | 155 if (kNumTemps == 1) { |
| 156 locs->set_temp(0, Location::RequiresRegister()); | 156 locs->set_temp(0, Location::RequiresRegister()); |
| 157 } | 157 } |
| 158 return locs; | 158 return locs; |
| 159 } | 159 } |
| 160 | 160 |
| 161 | 161 |
| 162 void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 162 void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 163 // The register allocator drops constant definitions that have no uses. | 163 // The register allocator drops constant definitions that have no uses. |
| 164 if (!locs()->out(0).IsInvalid()) { | 164 if (!locs()->out(0).IsInvalid()) { |
| 165 XmmRegister result = locs()->out(0).fpu_reg(); |
| 165 if (constant_address() == 0) { | 166 if (constant_address() == 0) { |
| 166 Register boxed = locs()->temp(0).reg(); | 167 Register boxed = locs()->temp(0).reg(); |
| 167 XmmRegister result = locs()->out(0).fpu_reg(); | |
| 168 __ LoadObjectSafely(boxed, value()); | 168 __ LoadObjectSafely(boxed, value()); |
| 169 __ movsd(result, FieldAddress(boxed, Double::value_offset())); | 169 __ movsd(result, FieldAddress(boxed, Double::value_offset())); |
| 170 } else if (Utils::DoublesBitEqual(Double::Cast(value()).value(), 0.0)) { |
| 171 __ xorps(result, result); |
| 170 } else { | 172 } else { |
| 171 XmmRegister result = locs()->out(0).fpu_reg(); | |
| 172 __ movsd(result, Address::Absolute(constant_address())); | 173 __ movsd(result, Address::Absolute(constant_address())); |
| 173 } | 174 } |
| 174 } | 175 } |
| 175 } | 176 } |
| 176 | 177 |
| 177 | 178 |
| 178 LocationSummary* AssertAssignableInstr::MakeLocationSummary(bool opt) const { | 179 LocationSummary* AssertAssignableInstr::MakeLocationSummary(bool opt) const { |
| 179 const intptr_t kNumInputs = 3; | 180 const intptr_t kNumInputs = 3; |
| 180 const intptr_t kNumTemps = 0; | 181 const intptr_t kNumTemps = 0; |
| 181 LocationSummary* summary = | 182 LocationSummary* summary = |
| (...skipping 5848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6030 PcDescriptors::kOther, | 6031 PcDescriptors::kOther, |
| 6031 locs()); | 6032 locs()); |
| 6032 __ Drop(ArgumentCount()); // Discard arguments. | 6033 __ Drop(ArgumentCount()); // Discard arguments. |
| 6033 } | 6034 } |
| 6034 | 6035 |
| 6035 } // namespace dart | 6036 } // namespace dart |
| 6036 | 6037 |
| 6037 #undef __ | 6038 #undef __ |
| 6038 | 6039 |
| 6039 #endif // defined TARGET_ARCH_IA32 | 6040 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |