/* Given the 'reg' portion of a ModRM byte, and a register block, return a pointer into the block that addresses the relevant register. @highbyte_regs specifies whether to decode AH,CH,DH,BH.  */
static void* decode_register(u8 modrm_reg, unsigned long *regs, int highbyte_regs)
/* Given the 'reg' portion of a ModRM byte, and a register block, return a pointer into the block that addresses the relevant register. @highbyte_regs specifies whether to decode AH,CH,DH,BH.  */
static void* decode_register(u8 modrm_reg, unsigned long *regs, int highbyte_regs)
{
	void *p;
	p = &regs[modrm_reg];
	if (highbyte_regs && modrm_reg >= 4 && modrm_reg < 8)
		p = (unsigned char *)&regs[modrm_reg & 3] + 1;
	return p;
}