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

Unified Diff: src/arm/disasm-arm.cc

Issue 1576026: Add support for bkpt instruction... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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
Index: src/arm/disasm-arm.cc
===================================================================
--- src/arm/disasm-arm.cc (revision 4358)
+++ src/arm/disasm-arm.cc (working copy)
@@ -449,6 +449,14 @@
out_buffer_pos_ += v8i::OS::SNPrintF(out_buffer_ + out_buffer_pos_,
"%d", instr->ShiftAmountField());
return 8;
+ } else if (format[3] == '0') {
+ // 'off0to3and8to19 16-bit immediate encoded in bits 19-8 and 3-0.
+ ASSERT(STRING_STARTS_WITH(format, "off0to3and8to19"));
+ out_buffer_pos_ += v8i::OS::SNPrintF(out_buffer_ + out_buffer_pos_,
+ "%d",
+ (instr->Bits(19, 8) << 4) +
+ instr->Bits(3, 0));
+ return 15;
}
// 'off8: 8-bit offset for extra load and store instructions
ASSERT(STRING_STARTS_WITH(format, "off8"));
@@ -650,6 +658,34 @@
}
return;
}
+ } else if ((type == 0) && instr->IsMiscType0()) {
Erik Corry 2010/04/08 12:56:30 This is a little strange to me, but if it matches
Søren Thygesen Gjesse 2010/04/08 13:29:06 Section A5.2 in ARM® Architecture Reference Manual
+ if (instr->Bits(22, 21) == 1) {
+ switch (instr->Bits(7, 4)) {
+ case BX:
+ Format(instr, "bx'cond 'rm");
+ break;
+ case BLX:
+ Format(instr, "blx'cond 'rm");
+ break;
+ case BKPT:
+ Format(instr, "bkpt 'off0to3and8to19");
+ break;
+ default:
+ Unknown(instr); // not used by V8
+ break;
+ }
+ } else if (instr->Bits(22, 21) == 3) {
+ switch (instr->Bits(7, 4)) {
+ case CLZ:
+ Format(instr, "clz'cond 'rd, 'rm");
+ break;
+ default:
+ Unknown(instr); // not used by V8
+ break;
+ }
+ } else {
+ Unknown(instr); // not used by V8
+ }
} else {
switch (instr->OpcodeField()) {
case AND: {
@@ -696,17 +732,7 @@
if (instr->HasS()) {
Format(instr, "teq'cond 'rn, 'shift_op");
} else {
- switch (instr->Bits(7, 4)) {
- case BX:
- Format(instr, "bx'cond 'rm");
- break;
- case BLX:
- Format(instr, "blx'cond 'rm");
- break;
- default:
- Unknown(instr); // not used by V8
- break;
- }
+ Unknown(instr); // not used by V8
Erik Corry 2010/04/08 12:56:30 UNREACHABLE(); // Handled by IsMiscType0 code abo
Søren Thygesen Gjesse 2010/04/08 13:29:06 Done.
}
break;
}
@@ -722,14 +748,7 @@
if (instr->HasS()) {
Format(instr, "cmn'cond 'rn, 'shift_op");
} else {
- switch (instr->Bits(7, 4)) {
- case CLZ:
- Format(instr, "clz'cond 'rd, 'rm");
- break;
- default:
- Unknown(instr); // not used by V8
- break;
- }
+ Unknown(instr); // not used by V8
Erik Corry 2010/04/08 12:56:30 And here.
Søren Thygesen Gjesse 2010/04/08 13:29:06 Done.
}
break;
}
« no previous file with comments | « src/arm/constants-arm.h ('k') | src/arm/simulator-arm.cc » ('j') | src/arm/simulator-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698