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

Unified Diff: runtime/vm/simulator_arm.cc

Issue 12378080: Adds mrc instruction to arm simulator, assembler, disassembler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« runtime/vm/simulator_arm.h ('K') | « runtime/vm/simulator_arm.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_arm.cc
===================================================================
--- runtime/vm/simulator_arm.cc (revision 19404)
+++ runtime/vm/simulator_arm.cc (working copy)
@@ -24,6 +24,7 @@
DEFINE_FLAG(bool, trace_sim, false, "Trace simulator execution.");
DEFINE_FLAG(int, stop_sim_at, 0, "Address to stop simulator at.");
+DEFINE_FLAG(bool, sim_has_int_div, false, "Simulator implements sdiv and udiv");
regis 2013/03/04 21:54:52 not necessary.
// This macro provides a platform independent use of sscanf. The reason for
@@ -2585,6 +2586,14 @@
UNIMPLEMENTED();
}
}
+ } else if (instr->IsMrcIdIsar0()) {
+ // mrc of ID_ISAR0
+ Register rd = instr->RdField();
+ if (FLAG_sim_has_int_div) {
regis 2013/03/04 21:54:52 Test CPUFeatures instead.
+ set_register(rd, 0x02100010); // sim has sdiv, udiv, bkpt and clz
+ } else {
+ set_register(rd, 0x00100010); // simulator has only bkpt and clz
+ }
} else {
UNIMPLEMENTED();
}
« runtime/vm/simulator_arm.h ('K') | « runtime/vm/simulator_arm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698