| 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 2132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2143 LocationSummary* locs = | 2143 LocationSummary* locs = |
| 2144 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 2144 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); |
| 2145 locs->set_in(0, Location::RegisterLocation(RAX)); | 2145 locs->set_in(0, Location::RegisterLocation(RAX)); |
| 2146 locs->set_in(1, Location::RegisterLocation(RCX)); | 2146 locs->set_in(1, Location::RegisterLocation(RCX)); |
| 2147 locs->set_temp(0, Location::RegisterLocation(RDX)); | 2147 locs->set_temp(0, Location::RegisterLocation(RDX)); |
| 2148 return locs; | 2148 return locs; |
| 2149 } | 2149 } |
| 2150 // Otherwise polymorphic dispatch. | 2150 // Otherwise polymorphic dispatch. |
| 2151 } | 2151 } |
| 2152 // Call. | 2152 // Call. |
| 2153 LocationSummary* result = new LocationSummary(0, 0, LocationSummary::kCall); | 2153 return Computation::MakeCallSummary(); |
| 2154 result->set_out(Location::RegisterLocation(RAX)); | |
| 2155 return result; | |
| 2156 } | 2154 } |
| 2157 | 2155 |
| 2158 | 2156 |
| 2159 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2157 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2160 if ((kind() == Token::kEQ_STRICT) || (kind() == Token::kNE_STRICT)) { | 2158 if ((kind() == Token::kEQ_STRICT) || (kind() == Token::kNE_STRICT)) { |
| 2161 Register left = locs()->in(0).reg(); | 2159 Register left = locs()->in(0).reg(); |
| 2162 Register right = locs()->in(1).reg(); | 2160 Register right = locs()->in(1).reg(); |
| 2163 __ cmpq(left, right); | 2161 __ cmpq(left, right); |
| 2164 Condition cond = (kind() == Token::kEQ_STRICT) ? EQUAL : NOT_EQUAL; | 2162 Condition cond = (kind() == Token::kEQ_STRICT) ? EQUAL : NOT_EQUAL; |
| 2165 EmitBranchOnCondition(compiler, cond); | 2163 EmitBranchOnCondition(compiler, cond); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2206 ASSERT(locs()->out().reg() == RAX); | 2204 ASSERT(locs()->out().reg() == RAX); |
| 2207 __ CompareObject(locs()->out().reg(), compiler->bool_true()); | 2205 __ CompareObject(locs()->out().reg(), compiler->bool_true()); |
| 2208 EmitBranchOnCondition(compiler, branch_condition); | 2206 EmitBranchOnCondition(compiler, branch_condition); |
| 2209 } | 2207 } |
| 2210 | 2208 |
| 2211 } // namespace dart | 2209 } // namespace dart |
| 2212 | 2210 |
| 2213 #undef __ | 2211 #undef __ |
| 2214 | 2212 |
| 2215 #endif // defined TARGET_ARCH_X64 | 2213 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |