From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <16c90927387c0a9664e3f4c14e0736b3@felloff.net> Date: Fri, 17 Jan 2014 21:07:45 +0100 From: cinap_lenrek@felloff.net To: quanstro@labs.coraid.com MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Cc: 9fans@9fans.net Subject: [9fans] MOVLQSX wrong operand order Topicbox-Message-UUID: b3c6653a-ead8-11e9-9d60-3106f5b1d025 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