Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 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 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1338 return NULL; | 1338 return NULL; |
| 1339 } | 1339 } |
| 1340 | 1340 |
| 1341 | 1341 |
| 1342 void UnaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1342 void UnaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1343 UNIMPLEMENTED(); | 1343 UNIMPLEMENTED(); |
| 1344 } | 1344 } |
| 1345 | 1345 |
| 1346 | 1346 |
| 1347 LocationSummary* ThrowInstr::MakeLocationSummary(bool opt) const { | 1347 LocationSummary* ThrowInstr::MakeLocationSummary(bool opt) const { |
| 1348 UNIMPLEMENTED(); | 1348 return new LocationSummary(0, 0, LocationSummary::kCall); |
| 1349 return NULL; | |
| 1350 } | 1349 } |
| 1351 | 1350 |
| 1352 | 1351 |
| 1353 void ThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1352 void ThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1354 UNIMPLEMENTED(); | 1353 compiler->GenerateRuntimeCall(token_pos(), |
| 1354 deopt_id(), | |
| 1355 kThrowRuntimeEntry, | |
| 1356 1, | |
| 1357 locs()); | |
| 1358 __ hlt(0); | |
| 1355 } | 1359 } |
| 1356 | 1360 |
| 1357 | 1361 |
| 1358 LocationSummary* ReThrowInstr::MakeLocationSummary(bool opt) const { | 1362 LocationSummary* ReThrowInstr::MakeLocationSummary(bool opt) const { |
| 1359 UNIMPLEMENTED(); | 1363 UNIMPLEMENTED(); |
| 1360 return NULL; | 1364 return NULL; |
| 1361 } | 1365 } |
| 1362 | 1366 |
| 1363 | 1367 |
| 1364 void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1368 void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1543 BranchInstr* branch) { | 1547 BranchInstr* branch) { |
| 1544 ASSERT(kind() == Token::kEQ_STRICT || kind() == Token::kNE_STRICT); | 1548 ASSERT(kind() == Token::kEQ_STRICT || kind() == Token::kNE_STRICT); |
| 1545 | 1549 |
| 1546 BranchLabels labels = compiler->CreateBranchLabels(branch); | 1550 BranchLabels labels = compiler->CreateBranchLabels(branch); |
| 1547 Condition true_condition = EmitComparisonCode(compiler, labels); | 1551 Condition true_condition = EmitComparisonCode(compiler, labels); |
| 1548 EmitBranchOnCondition(compiler, true_condition, labels); | 1552 EmitBranchOnCondition(compiler, true_condition, labels); |
| 1549 } | 1553 } |
| 1550 | 1554 |
| 1551 | 1555 |
| 1552 LocationSummary* BooleanNegateInstr::MakeLocationSummary(bool opt) const { | 1556 LocationSummary* BooleanNegateInstr::MakeLocationSummary(bool opt) const { |
| 1553 UNIMPLEMENTED(); | 1557 return LocationSummary::Make(1, |
| 1554 return NULL; | 1558 Location::RequiresRegister(), |
| 1559 LocationSummary::kNoCall); | |
| 1555 } | 1560 } |
| 1556 | 1561 |
| 1557 | 1562 |
| 1558 void BooleanNegateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1563 void BooleanNegateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1559 UNIMPLEMENTED(); | 1564 Register value = locs()->in(0).reg(); |
| 1565 Register result = locs()->out(0).reg(); | |
| 1566 | |
| 1567 __ LoadObject(result, Bool::True(), PP); | |
| 1568 __ LoadObject(TMP, Bool::False(), PP); | |
| 1569 __ CompareRegisters(result, value); | |
| 1570 __ csel(result, TMP, result, EQ); | |
|
regis
2014/04/25 21:17:51
Is csel really better than a branch? true and fals
zra
2014/04/25 21:28:28
Loading true and false are one instruction each fr
| |
| 1560 } | 1571 } |
| 1561 | 1572 |
| 1562 | 1573 |
| 1563 LocationSummary* AllocateObjectInstr::MakeLocationSummary(bool opt) const { | 1574 LocationSummary* AllocateObjectInstr::MakeLocationSummary(bool opt) const { |
| 1564 UNIMPLEMENTED(); | 1575 return MakeCallSummary(); |
| 1565 return NULL; | |
| 1566 } | 1576 } |
| 1567 | 1577 |
| 1568 | 1578 |
| 1569 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1579 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1570 UNIMPLEMENTED(); | 1580 const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls())); |
| 1581 const ExternalLabel label(cls().ToCString(), stub.EntryPoint()); | |
| 1582 compiler->GenerateCall(token_pos(), | |
| 1583 &label, | |
| 1584 PcDescriptors::kOther, | |
| 1585 locs()); | |
| 1586 __ Drop(ArgumentCount()); // Discard arguments. | |
| 1571 } | 1587 } |
| 1572 | 1588 |
| 1573 } // namespace dart | 1589 } // namespace dart |
| 1574 | 1590 |
| 1575 #endif // defined TARGET_ARCH_ARM64 | 1591 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |