Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(482)

Side by Side Diff: runtime/vm/assembler_arm.cc

Issue 16194010: Removes ARM mrc instruction. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/assembler_arm_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "vm/simulator.h" 9 #include "vm/simulator.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 void Assembler::blx(Register rm, Condition cond) { 1236 void Assembler::blx(Register rm, Condition cond) {
1237 ASSERT(rm != kNoRegister); 1237 ASSERT(rm != kNoRegister);
1238 ASSERT(cond != kNoCondition); 1238 ASSERT(cond != kNoCondition);
1239 int32_t encoding = (static_cast<int32_t>(cond) << kConditionShift) | 1239 int32_t encoding = (static_cast<int32_t>(cond) << kConditionShift) |
1240 B24 | B21 | (0xfff << 8) | B5 | B4 | 1240 B24 | B21 | (0xfff << 8) | B5 | B4 |
1241 (static_cast<int32_t>(rm) << kRmShift); 1241 (static_cast<int32_t>(rm) << kRmShift);
1242 Emit(encoding); 1242 Emit(encoding);
1243 } 1243 }
1244 1244
1245 1245
1246 void Assembler::mrc(Register rd, int32_t coproc, int32_t opc1,
1247 int32_t crn, int32_t crm, int32_t opc2, Condition cond) {
1248 ASSERT(rd != kNoRegister);
1249 ASSERT(cond != kNoCondition);
1250
1251 // This is all the simulator and disassembler know about.
1252 ASSERT(coproc == 15);
1253 ASSERT(opc1 == 0);
1254 ASSERT(crn == 0);
1255 ASSERT(crm == 2);
1256 ASSERT(opc2 == 0);
1257 int32_t encoding = (static_cast<int32_t>(cond) << kConditionShift) |
1258 B27 | B26 | B25 | B20 | B4 |
1259 ((opc1 & 0x7) << kOpc1Shift) |
1260 ((crn & 0xf) << kCRnShift) |
1261 ((coproc & 0xf) << kCoprocShift) |
1262 ((opc2 & 0x7) << kOpc2Shift) |
1263 ((crm & 0xf) << kCRmShift) |
1264 (static_cast<int32_t>(rd) << kRdShift);
1265 Emit(encoding);
1266 }
1267
1268
1269 void Assembler::MarkExceptionHandler(Label* label) { 1246 void Assembler::MarkExceptionHandler(Label* label) {
1270 EmitType01(AL, 1, TST, 1, PC, R0, ShifterOperand(0)); 1247 EmitType01(AL, 1, TST, 1, PC, R0, ShifterOperand(0));
1271 Label l; 1248 Label l;
1272 b(&l); 1249 b(&l);
1273 EmitBranch(AL, label, false); 1250 EmitBranch(AL, label, false);
1274 Bind(&l); 1251 Bind(&l);
1275 } 1252 }
1276 1253
1277 1254
1278 void Assembler::Drop(intptr_t stack_elements) { 1255 void Assembler::Drop(intptr_t stack_elements) {
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
2206 2183
2207 const char* Assembler::FpuRegisterName(FpuRegister reg) { 2184 const char* Assembler::FpuRegisterName(FpuRegister reg) {
2208 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 2185 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
2209 return fpu_reg_names[reg]; 2186 return fpu_reg_names[reg];
2210 } 2187 }
2211 2188
2212 } // namespace dart 2189 } // namespace dart
2213 2190
2214 #endif // defined TARGET_ARCH_ARM 2191 #endif // defined TARGET_ARCH_ARM
2215 2192
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/assembler_arm_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698