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

Unified Diff: runtime/vm/disassembler_mips.cc

Issue 12837009: Adds MIPS SPECIAL instructions to simulator, assembler, debugger. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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: runtime/vm/disassembler_mips.cc
===================================================================
--- runtime/vm/disassembler_mips.cc (revision 20092)
+++ runtime/vm/disassembler_mips.cc (working copy)
@@ -229,6 +229,14 @@
Format(instr, "divu 'rs, 'rt");
break;
}
+ case JALR: {
+ Format(instr, "jalr'hint 'rd, 'rs");
+ break;
+ }
+ case JR: {
+ Format(instr, "jr'hint 'rs");
+ break;
+ }
case MFHI: {
Format(instr, "mfhi 'rd");
break;
@@ -237,6 +245,36 @@
Format(instr, "mflo 'rd");
break;
}
+ case MOVN: {
+ Format(instr, "movn 'rd, 'rs, 'rt");
+ break;
+ }
+ case MOVZ: {
+ Format(instr, "movz 'rd, 'rs, 'rt");
+ break;
+ }
+ case MULT: {
+ Format(instr, "mult 'rs, 'rt");
+ break;
+ }
+ case MULTU: {
+ Format(instr, "multu 'rs, 'rt");
+ break;
+ }
+ case NOR: {
+ Format(instr, "nor 'rd, 'rs, 'rt");
+ break;
+ }
+ case OR: {
+ if (instr->RsField() == R0) {
+ Format(instr, "mov 'rd, 'rt");
Ivan Posva 2013/03/20 01:54:51 Is the expectation that if it is "or RD, R0, R0" t
zra 2013/03/20 15:53:50 Done.
+ } else if (instr->RtField() == R0) {
+ Format(instr, "mov 'rd, 'rs");
+ } else {
+ Format(instr, "or 'rd, 'rs, 'rt");
+ }
+ break;
+ }
case SLL: {
if ((instr->RdField() == R0) &&
(instr->RtField() == R0) &&
@@ -247,10 +285,54 @@
}
break;
}
- case JR: {
- Format(instr, "jr'hint 'rs");
+ case SLLV: {
+ Format(instr, "sllv 'rd, 'rt, 'rs");
break;
}
+ case SLT: {
+ Format(instr, "slt 'rd, 'rs, 'rt");
+ break;
+ }
+ case SLTU: {
+ Format(instr, "sltu 'rd, 'rs, 'rt");
+ break;
+ }
+ case SRA: {
+ Format(instr, "sra 'rd, 'rt, 'sa");
Ivan Posva 2013/03/20 01:54:51 Here and others: The SRA instruction expects the R
zra 2013/03/20 15:53:50 In the assembler, sra() passes 0 for rs to EmitRTy
Ivan Posva 2013/03/21 00:08:06 You could do Unkown(instr) like you do in SRL.
+ break;
+ }
+ case SRAV: {
+ Format(instr, "srav 'rd, 'rt, 'rs");
+ break;
+ }
+ case SRL: {
+ if (instr->RsField() == 0) {
+ Format(instr, "srl 'rd, 'rt, 'sa");
+ } else {
+ Unknown(instr);
+ }
+ break;
+ }
+ case SRLV: {
+ if (instr->SaField() == 0) {
+ Format(instr, "srlv 'rd, 'rt, 'rs");
+ } else {
+ Unknown(instr);
+ }
+ break;
+ }
+ case SUB: {
+ Format(instr, "sub 'rd, 'rs, 'rt");
+ break;
+ }
+ case SUBU: {
+ Format(instr, "subu 'rd, 'rs, 'rt");
+ break;
+ }
+ case XOR: {
+ Format(instr, "xor 'rd, 'rs, 'rt");
+ break;
+ }
default: {
Unknown(instr);
break;

Powered by Google App Engine
This is Rietveld 408576698