| 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/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2314 __ Bind(&done); | 2314 __ Bind(&done); |
| 2315 } | 2315 } |
| 2316 | 2316 |
| 2317 | 2317 |
| 2318 LocationSummary* DoubleToSmiInstr::MakeLocationSummary() const { | 2318 LocationSummary* DoubleToSmiInstr::MakeLocationSummary() const { |
| 2319 const intptr_t kNumInputs = 1; | 2319 const intptr_t kNumInputs = 1; |
| 2320 const intptr_t kNumTemps = 0; | 2320 const intptr_t kNumTemps = 0; |
| 2321 LocationSummary* result = new LocationSummary( | 2321 LocationSummary* result = new LocationSummary( |
| 2322 kNumInputs, kNumTemps, LocationSummary::kNoCall); | 2322 kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 2323 result->set_in(0, Location::RequiresXmmRegister()); | 2323 result->set_in(0, Location::RequiresXmmRegister()); |
| 2324 result->set_out(Location:: Location::RequiresRegister()); | 2324 result->set_out(Location::RequiresRegister()); |
| 2325 return result; | 2325 return result; |
| 2326 } | 2326 } |
| 2327 | 2327 |
| 2328 | 2328 |
| 2329 void DoubleToSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2329 void DoubleToSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2330 Label* deopt = compiler->AddDeoptStub(deopt_id(), kDeoptDoubleToSmi); | 2330 Label* deopt = compiler->AddDeoptStub(deopt_id(), kDeoptDoubleToSmi); |
| 2331 Register result = locs()->out().reg(); | 2331 Register result = locs()->out().reg(); |
| 2332 XmmRegister value = locs()->in(0).xmm_reg(); | 2332 XmmRegister value = locs()->in(0).xmm_reg(); |
| 2333 __ cvttsd2si(result, value); | 2333 __ cvttsd2si(result, value); |
| 2334 // Overflow is signalled with minint. | 2334 // Overflow is signalled with minint. |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2817 __ pcmpeqq(XMM0, XMM0); // Generate all 1's. | 2817 __ pcmpeqq(XMM0, XMM0); // Generate all 1's. |
| 2818 __ pxor(value, XMM0); | 2818 __ pxor(value, XMM0); |
| 2819 } | 2819 } |
| 2820 | 2820 |
| 2821 | 2821 |
| 2822 } // namespace dart | 2822 } // namespace dart |
| 2823 | 2823 |
| 2824 #undef __ | 2824 #undef __ |
| 2825 | 2825 |
| 2826 #endif // defined TARGET_ARCH_X64 | 2826 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |