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

Unified Diff: runtime/vm/simulator_arm.cc

Issue 13983016: Support debugger API on ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « runtime/vm/object_store.cc ('k') | runtime/vm/simulator_mips.cc » ('j') | 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 21886)
+++ runtime/vm/simulator_arm.cc (working copy)
@@ -505,8 +505,7 @@
char line_buf[256];
int offset = 0;
bool keep_going = true;
- fprintf(stdout, "%s", prompt);
- fflush(stdout);
+ OS::Print("%s", prompt);
while (keep_going) {
if (fgets(line_buf, sizeof(line_buf), stdin) == NULL) {
// fgets got an error. Just give up.
@@ -1556,6 +1555,27 @@
}
break;
}
+ case 6: {
+ // Registers rd_lo, rd_hi, rn, rm are encoded as rd, rn, rm, rs.
+ // Format(instr, "smull'cond's 'rd, 'rn, 'rm, 'rs");
+ int64_t left_op = static_cast<int32_t>(rm_val);
+ int64_t right_op = static_cast<int32_t>(rs_val);
+ int64_t result = left_op * right_op;
+ int32_t hi_res = Utils::High32Bits(result);
+ int32_t lo_res = Utils::Low32Bits(result);
+ set_register(rd, lo_res);
+ set_register(rn, hi_res);
+ if (instr->HasS()) {
+ if (lo_res != 0) {
+ // Collapse bits 0..31 into bit 32 so that 32-bit Z check works.
+ hi_res |= 1;
+ }
+ ASSERT((result == 0) == (hi_res == 0)); // Z bit
+ ASSERT(((result & (1LL << 63)) != 0) == (hi_res < 0)); // N bit
+ SetNZFlags(hi_res);
+ }
+ break;
+ }
default: {
UnimplementedInstruction(instr);
break;
« no previous file with comments | « runtime/vm/object_store.cc ('k') | runtime/vm/simulator_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698