shithub: riscv

Download patch

ref: 3e8a38dfb33e26395d63467669dbf896ec774eaa
parent: cf76ca4f3214c3aed03bc99c48e74d87f4dd0756
author: cinap_lenrek <[email protected]>
date: Sat May 4 14:40:05 EDT 2013

libmach: update mips disassembler (from sources)

--- a/sys/src/libmach/vcodas.c
+++ b/sys/src/libmach/vcodas.c
@@ -492,9 +492,13 @@
 		case 16:
 			m = "rfe";
 			break;
-	
-		case 32:
+
+		case 24:
 			m = "eret";
+			break;	
+
+		case 32:
+			m = "wait";
 			break;
 		}
 		if (m) {
--- a/sys/src/libmach/vdb.c
+++ b/sys/src/libmach/vdb.c
@@ -415,7 +415,9 @@
 sll(Opcode *o, Instr *i)
 {
 	if (i->w0 == 0)
-		bprint(i, "NOOP");
+		bprint(i, "NOOP");	/* unofficial nop */
+	else if (i->w0 == 0xc0)		/* 0xc0: SLL $3,R0 */
+		bprint(i, "EHB");
 	else if (i->rd == i->rt)
 		format(o->mnemonic, i, "$%a,R%d");
 	else
@@ -962,8 +964,12 @@
 			m = "RFE";
 			break;
 	
-		case 32:
+		case 24:
 			m = "ERET";
+			break;
+
+		case 32:
+			m = "WAIT";
 			break;
 		}
 		if (m) {