libmach: fix printing of amd64 modrm byte register with rex prefix

This commit is contained in:
cinap_lenrek 2014-04-15 00:37:01 +02:00
parent 81545f346f
commit f02f05ca6a

View file

@ -1878,7 +1878,7 @@ pea(Instr *ip)
{
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