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 1993033002: Add ldrex and strex instructions to ARM assembler/disassmbler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | « src/arm/assembler-arm.cc ('k') | test/cctest/test-disasm-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/disasm-arm.cc
diff --git a/src/arm/disasm-arm.cc b/src/arm/disasm-arm.cc
index 20a898ed7a643db382843098180ad99f98cbbcaf..4a03f7119b695eb0c7197bc7f396bd8cde1f5b71 100644
--- a/src/arm/disasm-arm.cc
+++ b/src/arm/disasm-arm.cc
@@ -755,7 +755,45 @@ void Decoder::DecodeType01(Instruction* instr) {
Format(instr, "'um'al'cond's 'rd, 'rn, 'rm, 'rs");
}
} else {
- Unknown(instr); // not used by V8
+ if (instr->Bits(24, 23) == 3) {
+ if (instr->Bit(20) == 1) {
+ // ldrex
+ switch (instr->Bits(22, 21)) {
+ case 0:
+ Format(instr, "ldrex'cond 'rt, ['rn]");
+ break;
+ case 2:
+ Format(instr, "ldrexb'cond 'rt, ['rn]");
+ break;
+ case 3:
+ Format(instr, "ldrexh'cond 'rt, ['rn]");
+ break;
+ default:
+ UNREACHABLE();
+ break;
+ }
+ } else {
+ // strex
+ // The instruction is documented as strex rd, rt, [rn], but the
+ // "rt" register is using the rm bits.
+ switch (instr->Bits(22, 21)) {
+ case 0:
+ Format(instr, "strex'cond 'rd, 'rm, ['rn]");
+ break;
+ case 2:
+ Format(instr, "strexb'cond 'rd, 'rm, ['rn]");
+ break;
+ case 3:
+ Format(instr, "strexh'cond 'rd, 'rm, ['rn]");
+ break;
+ default:
+ UNREACHABLE();
+ break;
+ }
+ }
+ } else {
+ Unknown(instr); // not used by V8
+ }
}
} else if ((instr->Bit(20) == 0) && ((instr->Bits(7, 4) & 0xd) == 0xd)) {
// ldrd, strd
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | test/cctest/test-disasm-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698