| 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/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 #include "vm/locations.h" | 9 #include "vm/locations.h" |
| 10 #include "vm/stub_code.h" | 10 #include "vm/stub_code.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 intptr_t input_count, Location out) { | 39 intptr_t input_count, Location out) { |
| 40 LocationSummary* summary = new LocationSummary(input_count); | 40 LocationSummary* summary = new LocationSummary(input_count); |
| 41 for (intptr_t i = 0; i < input_count; i++) { | 41 for (intptr_t i = 0; i < input_count; i++) { |
| 42 summary->set_in(i, Location::RequiresRegister()); | 42 summary->set_in(i, Location::RequiresRegister()); |
| 43 } | 43 } |
| 44 summary->set_out(out); | 44 summary->set_out(out); |
| 45 return summary; | 45 return summary; |
| 46 } | 46 } |
| 47 | 47 |
| 48 | 48 |
| 49 LocationSummary* CurrentContextComp::MakeLocationSummary() { |
| 50 return MakeSimpleLocationSummary(0, Location::RequiresRegister()); |
| 51 } |
| 52 |
| 53 |
| 54 void CurrentContextComp::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 55 __ movq(locs()->out().reg(), CTX); |
| 56 } |
| 57 |
| 58 |
| 59 LocationSummary* StoreContextComp::MakeLocationSummary() { |
| 60 LocationSummary* summary = new LocationSummary(1); |
| 61 summary->set_in(0, Location::RegisterLocation(CTX)); |
| 62 return summary; |
| 63 } |
| 64 |
| 65 |
| 66 void StoreContextComp::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 67 // Nothing to do. Context register were loaded by register allocator. |
| 68 ASSERT(locs()->in(0).reg() == CTX); |
| 69 } |
| 70 |
| 71 |
| 49 LocationSummary* StrictCompareComp::MakeLocationSummary() { | 72 LocationSummary* StrictCompareComp::MakeLocationSummary() { |
| 50 return MakeSimpleLocationSummary(2, Location::SameAsFirstInput()); | 73 return MakeSimpleLocationSummary(2, Location::SameAsFirstInput()); |
| 51 } | 74 } |
| 52 | 75 |
| 53 | 76 |
| 54 void StrictCompareComp::EmitNativeCode(FlowGraphCompiler* compiler) { | 77 void StrictCompareComp::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 55 const Bool& bool_true = Bool::ZoneHandle(Bool::True()); | 78 const Bool& bool_true = Bool::ZoneHandle(Bool::True()); |
| 56 const Bool& bool_false = Bool::ZoneHandle(Bool::False()); | 79 const Bool& bool_false = Bool::ZoneHandle(Bool::False()); |
| 57 | 80 |
| 58 Register left = locs()->in(0).reg(); | 81 Register left = locs()->in(0).reg(); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 computation()->EmitNativeCode(compiler); | 166 computation()->EmitNativeCode(compiler); |
| 144 __ pushq(locs()->out().reg()); | 167 __ pushq(locs()->out().reg()); |
| 145 } | 168 } |
| 146 | 169 |
| 147 | 170 |
| 148 } // namespace dart | 171 } // namespace dart |
| 149 | 172 |
| 150 #undef __ | 173 #undef __ |
| 151 | 174 |
| 152 #endif // defined TARGET_ARCH_X64 | 175 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |