ref: f02f05ca6a7a60a087a9fb7d6b2e81ff820e2d80
parent: 81545f346f985241083062f73d45e9426d519ba8
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Apr 14 20:37:01 EDT 2014
libmach: fix printing of amd64 modrm byte register with rex prefix
--- a/sys/src/libmach/8db.c
+++ b/sys/src/libmach/8db.c
@@ -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