Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 | 9 |
| 10 #include "vm/stub_code.h" | 10 #include "vm/stub_code.h" |
| (...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1109 void Assembler::blx(Register rm, Condition cond) { | 1109 void Assembler::blx(Register rm, Condition cond) { |
| 1110 ASSERT(rm != kNoRegister); | 1110 ASSERT(rm != kNoRegister); |
| 1111 ASSERT(cond != kNoCondition); | 1111 ASSERT(cond != kNoCondition); |
| 1112 int32_t encoding = (static_cast<int32_t>(cond) << kConditionShift) | | 1112 int32_t encoding = (static_cast<int32_t>(cond) << kConditionShift) | |
| 1113 B24 | B21 | (0xfff << 8) | B5 | B4 | | 1113 B24 | B21 | (0xfff << 8) | B5 | B4 | |
| 1114 (static_cast<int32_t>(rm) << kRmShift); | 1114 (static_cast<int32_t>(rm) << kRmShift); |
| 1115 Emit(encoding); | 1115 Emit(encoding); |
| 1116 } | 1116 } |
| 1117 | 1117 |
| 1118 | 1118 |
| 1119 void Assembler::mrc(Register rd, int32_t coproc, int32_t opc1, | |
| 1120 int32_t CRn, int32_t CRm, int32_t opc2, Condition cond) { | |
|
regis
2013/03/04 21:54:52
crn, crm
| |
| 1121 ASSERT(rd != kNoRegister); | |
| 1122 ASSERT(cond != kNoCondition); | |
| 1123 | |
| 1124 // This is all the simulator and disassembler know about. | |
| 1125 ASSERT(coproc == 15); | |
| 1126 ASSERT(opc1 == 0); | |
| 1127 ASSERT(CRn == 0); | |
| 1128 ASSERT(CRm == 2); | |
| 1129 ASSERT(opc2 == 0); | |
| 1130 int32_t encoding = (static_cast<int32_t>(cond) << kConditionShift) | | |
| 1131 B27 | B26 | B25 | B20 | B4 | | |
| 1132 ((opc1 & 0x7) << kOpc1Shift) | | |
| 1133 ((CRn & 0xf) << kCRnShift) | | |
| 1134 ((coproc & 0xf) << kCoprocShift) | | |
| 1135 ((opc2 & 0x7) << kOpc2Shift) | | |
| 1136 ((CRm & 0xf) << kCRmShift) | | |
| 1137 (static_cast<int32_t>(rd) << kRdShift); | |
| 1138 Emit(encoding); | |
| 1139 } | |
| 1140 | |
| 1141 | |
| 1119 void Assembler::MarkExceptionHandler(Label* label) { | 1142 void Assembler::MarkExceptionHandler(Label* label) { |
| 1120 EmitType01(AL, 1, TST, 1, PC, R0, ShifterOperand(0)); | 1143 EmitType01(AL, 1, TST, 1, PC, R0, ShifterOperand(0)); |
| 1121 Label l; | 1144 Label l; |
| 1122 b(&l); | 1145 b(&l); |
| 1123 EmitBranch(AL, label, false); | 1146 EmitBranch(AL, label, false); |
| 1124 Bind(&l); | 1147 Bind(&l); |
| 1125 } | 1148 } |
| 1126 | 1149 |
| 1127 | 1150 |
| 1128 void Assembler::LoadObject(Register rd, const Object& object) { | 1151 void Assembler::LoadObject(Register rd, const Object& object) { |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1733 // Do not reuse an existing entry, since each reference may be patched | 1756 // Do not reuse an existing entry, since each reference may be patched |
| 1734 // independently. | 1757 // independently. |
| 1735 object_pool_.Add(smi); | 1758 object_pool_.Add(smi); |
| 1736 return object_pool_.Length() - 1; | 1759 return object_pool_.Length() - 1; |
| 1737 } | 1760 } |
| 1738 | 1761 |
| 1739 } // namespace dart | 1762 } // namespace dart |
| 1740 | 1763 |
| 1741 #endif // defined TARGET_ARCH_ARM | 1764 #endif // defined TARGET_ARCH_ARM |
| 1742 | 1765 |
| OLD | NEW |