| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 if (value().IsSmi()) { | 158 if (value().IsSmi()) { |
| 159 int64_t imm = reinterpret_cast<int64_t>(value().raw()); | 159 int64_t imm = reinterpret_cast<int64_t>(value().raw()); |
| 160 __ movq(result, Immediate(imm)); | 160 __ movq(result, Immediate(imm)); |
| 161 } else { | 161 } else { |
| 162 __ LoadObject(result, value()); | 162 __ LoadObject(result, value()); |
| 163 } | 163 } |
| 164 } | 164 } |
| 165 | 165 |
| 166 | 166 |
| 167 LocationSummary* AssertAssignableComp::MakeLocationSummary() const { | 167 LocationSummary* AssertAssignableComp::MakeLocationSummary() const { |
| 168 LocationSummary* summary = new LocationSummary(3, 0); | 168 const intptr_t kNumInputs = 3; |
| 169 const intptr_t kNumTemps = 0; |
| 170 LocationSummary* summary = new LocationSummary(kNumInputs, |
| 171 kNumTemps, |
| 172 LocationSummary::kCall); |
| 169 summary->set_in(0, Location::RegisterLocation(RAX)); // Value. | 173 summary->set_in(0, Location::RegisterLocation(RAX)); // Value. |
| 170 summary->set_in(1, Location::RegisterLocation(RCX)); // Instantiator. | 174 summary->set_in(1, Location::RegisterLocation(RCX)); // Instantiator. |
| 171 summary->set_in(2, Location::RegisterLocation(RDX)); // Type arguments. | 175 summary->set_in(2, Location::RegisterLocation(RDX)); // Type arguments. |
| 172 summary->set_out(Location::RegisterLocation(RAX)); | 176 summary->set_out(Location::RegisterLocation(RAX)); |
| 173 return summary; | 177 return summary; |
| 174 } | 178 } |
| 175 | 179 |
| 176 | 180 |
| 177 void AssertBooleanComp::EmitNativeCode(FlowGraphCompiler* compiler) { | 181 void AssertBooleanComp::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 178 Register obj = locs()->in(0).reg(); | 182 Register obj = locs()->in(0).reg(); |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 | 981 |
| 978 | 982 |
| 979 void LoadStaticFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) { | 983 void LoadStaticFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 980 Register result = locs()->out().reg(); | 984 Register result = locs()->out().reg(); |
| 981 __ LoadObject(result, field()); | 985 __ LoadObject(result, field()); |
| 982 __ movq(result, FieldAddress(result, Field::value_offset())); | 986 __ movq(result, FieldAddress(result, Field::value_offset())); |
| 983 } | 987 } |
| 984 | 988 |
| 985 | 989 |
| 986 LocationSummary* InstanceOfComp::MakeLocationSummary() const { | 990 LocationSummary* InstanceOfComp::MakeLocationSummary() const { |
| 987 LocationSummary* summary = new LocationSummary(3, 0); | 991 const intptr_t kNumInputs = 3; |
| 992 const intptr_t kNumTemps = 0; |
| 993 LocationSummary* summary = new LocationSummary(kNumInputs, |
| 994 kNumTemps, |
| 995 LocationSummary::kCall); |
| 988 summary->set_in(0, Location::RegisterLocation(RAX)); | 996 summary->set_in(0, Location::RegisterLocation(RAX)); |
| 989 summary->set_in(1, Location::RegisterLocation(RCX)); | 997 summary->set_in(1, Location::RegisterLocation(RCX)); |
| 990 summary->set_in(2, Location::RegisterLocation(RDX)); | 998 summary->set_in(2, Location::RegisterLocation(RDX)); |
| 991 summary->set_out(Location::RegisterLocation(RAX)); | 999 summary->set_out(Location::RegisterLocation(RAX)); |
| 992 return summary; | 1000 return summary; |
| 993 } | 1001 } |
| 994 | 1002 |
| 995 | 1003 |
| 996 void InstanceOfComp::EmitNativeCode(FlowGraphCompiler* compiler) { | 1004 void InstanceOfComp::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 997 ASSERT(locs()->in(0).reg() == RAX); // Value. | 1005 ASSERT(locs()->in(0).reg() == RAX); // Value. |
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1971 instance_call()->argument_names()); | 1979 instance_call()->argument_names()); |
| 1972 } | 1980 } |
| 1973 __ Bind(&done); | 1981 __ Bind(&done); |
| 1974 } | 1982 } |
| 1975 | 1983 |
| 1976 } // namespace dart | 1984 } // namespace dart |
| 1977 | 1985 |
| 1978 #undef __ | 1986 #undef __ |
| 1979 | 1987 |
| 1980 #endif // defined TARGET_ARCH_X64 | 1988 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |