+2007-10-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (OP_REG): Set add to 0 only when needed.
+ (OP_C): Likewise.
+ (OP_D): Likewise.
+ (OP_MMX): Likewise.
+ (OP_XMM): Likewise.
+ (OP_EM): Likewise.
+ (OP_MXC): Likewise.
+ (OP_EX): Likewise.
+
2007-10-03 H.J. Lu <hongjiu.lu@intel.com>
* i386-opc.tbl: Update SSE comments.
OP_REG (int code, int sizeflag)
{
const char *s;
- int add = 0;
+ int add;
USED_REX (REX_B);
if (rex & REX_B)
add = 8;
+ else
+ add = 0;
switch (code)
{
static void
OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
- int add = 0;
+ int add;
if (rex & REX_R)
{
USED_REX (REX_R);
used_prefixes |= PREFIX_LOCK;
add = 8;
}
+ else
+ add = 0;
sprintf (scratchbuf, "%%cr%d", modrm.reg + add);
oappend (scratchbuf + intel_syntax);
}
static void
OP_D (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
- int add = 0;
+ int add;
USED_REX (REX_R);
if (rex & REX_R)
add = 8;
+ else
+ add = 0;
if (intel_syntax)
sprintf (scratchbuf, "db%d", modrm.reg + add);
else
used_prefixes |= (prefixes & PREFIX_DATA);
if (prefixes & PREFIX_DATA)
{
- int add = 0;
+ int add;
USED_REX (REX_R);
if (rex & REX_R)
add = 8;
+ else
+ add = 0;
sprintf (scratchbuf, "%%xmm%d", modrm.reg + add);
}
else
static void
OP_XMM (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
- int add = 0;
+ int add;
USED_REX (REX_R);
if (rex & REX_R)
add = 8;
+ else
+ add = 0;
sprintf (scratchbuf, "%%xmm%d", modrm.reg + add);
oappend (scratchbuf + intel_syntax);
}
used_prefixes |= (prefixes & PREFIX_DATA);
if (prefixes & PREFIX_DATA)
{
- int add = 0;
+ int add;
USED_REX (REX_B);
if (rex & REX_B)
add = 8;
+ else
+ add = 0;
sprintf (scratchbuf, "%%xmm%d", modrm.rm + add);
}
else
static void
OP_EX (int bytemode, int sizeflag)
{
- int add = 0;
+ int add;
if (modrm.mod != 3)
{
OP_E (bytemode, sizeflag);
USED_REX (REX_B);
if (rex & REX_B)
add = 8;
+ else
+ add = 0;
/* Skip mod/rm byte. */
MODRM_CHECK;