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

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

Issue 155109: - Update comments and fix a small glitch in the ARM disassembler.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 5 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 | « no previous file | src/arm/macro-assembler-arm.cc » ('j') | src/arm/macro-assembler-arm.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/disasm-arm.cc
===================================================================
--- src/arm/disasm-arm.cc (revision 2364)
+++ src/arm/disasm-arm.cc (working copy)
@@ -506,17 +506,25 @@
// multiply instructions
if (instr->Bit(23) == 0) {
if (instr->Bit(21) == 0) {
- // Mul calls it Rd. Everyone else calls it Rn.
+ // The MUL instruction description (A 4.1.33) refers to Rd as being
+ // the destination for the operation, but it confusingly uses the
+ // Rn field to encode it.
Format(instr, "mul'cond's 'rn, 'rm, 'rs");
} else {
- // In the manual the order is rd, rm, rs, rn. But mla swaps the
- // positions of rn and rd in the encoding.
+ // The MLA instruction description (A 4.1.28) refers to the order
+ // of registers as "Rd, Rm, Rs, Rn". But confusingly it uses the
+ // Rn field to encode the Rd register and the Rd field to encode
+ // the Rn register.
Format(instr, "mla'cond's 'rn, 'rm, 'rs, 'rd");
}
} else {
- // In the manual the order is RdHi, RdLo, Rm, Rs.
- // RdHi is what other instructions call Rn and RdLo is Rd.
- Format(instr, "'um'al'cond's 'rn, 'rd, 'rm, 'rs");
+ // The signed/long multiply instructions use the terms RdHi and RdLo
+ // when referring to the target registers. They are mapped to the Rn
+ // and Rd fields as follows:
+ // RdLo == Rd field
+ // RdHi == Rn field
+ // The order of registers is: <RdLo>, <RdHi>, <Rm>, <Rs>
+ Format(instr, "'um'al'cond's 'rd, 'rn, 'rm, 'rs");
}
} else {
Unknown(instr); // not used by V8
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.cc » ('j') | src/arm/macro-assembler-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698