9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] amd64 disassembly for modrm byte register with rex prefix fix
@ 2014-04-15  7:57 cinap_lenrek
  0 siblings, 0 replies; only message in thread
From: cinap_lenrek @ 2014-04-15  7:57 UTC (permalink / raw)
  To: 9fans

--- a/sys/src/libmach/8db.c	Fri Jan 17 21:09:17 2014 +0100
+++ b/sys/src/libmach/8db.c	Tue Apr 15 09:48:44 2014 +0200
@@ -1878,7 +1878,7 @@
 {
 	if (ip->mod == 3) {
 		if (ip->osize == 'B')
-			bprint(ip, (ip->rex & REXB? breg64: breg)[ip->base]);
+			bprint(ip, (ip->rex? breg64: breg)[ip->rex&REXB? ip->base+8: ip->base]);
 		else if(ip->rex & REXB)
 			bprint(ip, "%s%s", ANAME(ip), reg[ip->base+8]);
 		else

--
cinap



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-15  7:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-15  7:57 [9fans] amd64 disassembly for modrm byte register with rex prefix fix cinap_lenrek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).