| 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 3826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3837 case Token::kBIT_NOT: | 3837 case Token::kBIT_NOT: |
| 3838 __ notl(value); | 3838 __ notl(value); |
| 3839 __ andl(value, Immediate(~kSmiTagMask)); // Remove inverted smi-tag. | 3839 __ andl(value, Immediate(~kSmiTagMask)); // Remove inverted smi-tag. |
| 3840 break; | 3840 break; |
| 3841 default: | 3841 default: |
| 3842 UNREACHABLE(); | 3842 UNREACHABLE(); |
| 3843 } | 3843 } |
| 3844 } | 3844 } |
| 3845 | 3845 |
| 3846 | 3846 |
| 3847 LocationSummary* UnaryDoubleOpInstr::MakeLocationSummary() const { |
| 3848 const intptr_t kNumInputs = 1; |
| 3849 const intptr_t kNumTemps = 0; |
| 3850 LocationSummary* summary = |
| 3851 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3852 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3853 summary->set_out(Location::SameAsFirstInput()); |
| 3854 return summary; |
| 3855 } |
| 3856 |
| 3857 |
| 3858 void UnaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3859 XmmRegister value = locs()->in(0).fpu_reg(); |
| 3860 ASSERT(locs()->out().fpu_reg() == value); |
| 3861 __ DoubleNegate(value); |
| 3862 } |
| 3863 |
| 3864 |
| 3847 LocationSummary* SmiToDoubleInstr::MakeLocationSummary() const { | 3865 LocationSummary* SmiToDoubleInstr::MakeLocationSummary() const { |
| 3848 const intptr_t kNumInputs = 1; | 3866 const intptr_t kNumInputs = 1; |
| 3849 const intptr_t kNumTemps = 0; | 3867 const intptr_t kNumTemps = 0; |
| 3850 LocationSummary* result = | 3868 LocationSummary* result = |
| 3851 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3869 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3852 result->set_in(0, Location::WritableRegister()); | 3870 result->set_in(0, Location::WritableRegister()); |
| 3853 result->set_out(Location::RequiresFpuRegister()); | 3871 result->set_out(Location::RequiresFpuRegister()); |
| 3854 return result; | 3872 return result; |
| 3855 } | 3873 } |
| 3856 | 3874 |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4960 PcDescriptors::kOther, | 4978 PcDescriptors::kOther, |
| 4961 locs()); | 4979 locs()); |
| 4962 __ Drop(2); // Discard type arguments and receiver. | 4980 __ Drop(2); // Discard type arguments and receiver. |
| 4963 } | 4981 } |
| 4964 | 4982 |
| 4965 } // namespace dart | 4983 } // namespace dart |
| 4966 | 4984 |
| 4967 #undef __ | 4985 #undef __ |
| 4968 | 4986 |
| 4969 #endif // defined TARGET_ARCH_IA32 | 4987 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |