just disassembled some code generated by 6c
and found something funny. the debugger seems
to print the operands of MOVLQSX in the wrong
order.
output of 6c -S:
MOVLQSX BP,CX
ADDQ CX,AX
RET ,
output of acid:
foo+0x1a 0x00200042 MOVLQSX CX,BP
foo+0x1d 0x00200045 ADDQ CX,AX
foo+0x20 0x00200048 RET
fix:
diff -r 4e094627d459 sys/src/libmach/8db.c
--- a/sys/src/libmach/8db.c Tue Jan 14 00:22:13 2014 +0100
+++ b/sys/src/libmach/8db.c Fri Jan 17 21:06:42 2014 +0100
@@ -1223,7 +1223,7 @@
[0xfd] 0,0, "STD",
[0xfe] RMOPB,0, optabFE,
[0xff] RMOP,0, optabFF,
-[0x100] RM,0, "MOVLQSX %r,%e",
+[0x100] RM,0, "MOVLQSX %e,%r",
};
--
cinap