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 |