| 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 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2106 const intptr_t kNumTemps = 1; | 2106 const intptr_t kNumTemps = 1; |
| 2107 LocationSummary* summary = | 2107 LocationSummary* summary = |
| 2108 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 2108 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 2109 summary->set_in(0, Location::RequiresRegister()); | 2109 summary->set_in(0, Location::RequiresRegister()); |
| 2110 summary->set_temp(0, Location::RequiresRegister()); | 2110 summary->set_temp(0, Location::RequiresRegister()); |
| 2111 return summary; | 2111 return summary; |
| 2112 } | 2112 } |
| 2113 | 2113 |
| 2114 | 2114 |
| 2115 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2115 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2116 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) || |
| 2117 (unary_checks().NumberOfChecks() > 1)); |
| 2116 Register value = locs()->in(0).reg(); | 2118 Register value = locs()->in(0).reg(); |
| 2117 Register temp = locs()->temp(0).reg(); | 2119 Register temp = locs()->temp(0).reg(); |
| 2118 Label* deopt = compiler->AddDeoptStub(deopt_id(), | 2120 Label* deopt = compiler->AddDeoptStub(deopt_id(), |
| 2119 kDeoptCheckClass); | 2121 kDeoptCheckClass); |
| 2120 Label is_ok; | 2122 Label is_ok; |
| 2121 intptr_t cix = 0; | 2123 intptr_t cix = 0; |
| 2122 if (unary_checks().GetReceiverClassIdAt(cix) == kSmiCid) { | 2124 if (unary_checks().GetReceiverClassIdAt(cix) == kSmiCid) { |
| 2123 __ testq(value, Immediate(kSmiTagMask)); | 2125 __ testq(value, Immediate(kSmiTagMask)); |
| 2124 __ j(ZERO, &is_ok); | 2126 __ j(ZERO, &is_ok); |
| 2125 cix++; // Skip first check. | 2127 cix++; // Skip first check. |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2281 | 2283 |
| 2282 void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2284 void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2283 UNIMPLEMENTED(); | 2285 UNIMPLEMENTED(); |
| 2284 } | 2286 } |
| 2285 | 2287 |
| 2286 } // namespace dart | 2288 } // namespace dart |
| 2287 | 2289 |
| 2288 #undef __ | 2290 #undef __ |
| 2289 | 2291 |
| 2290 #endif // defined TARGET_ARCH_X64 | 2292 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |