+Mon Mar 18 21:10:43 CET 2002 Jan Hubicka <jh@suse.cz>
+
+ * i386-dis.c (prefix_name): Fix handling of 32bit address prefix
+ in 64bit mode.
+ (print_insn) Likewise.
+ (putop): Fix handling of 'E'
+ (OP_E, OP_OFF): handle 32bit addressing mode in 64bit.
+ (ptr_reg): Likewise.
+
2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
* po/fr.po: Updated version.
case 0x66:
return (sizeflag & DFLAG) ? "data16" : "data32";
case 0x67:
- return (sizeflag & AFLAG) ? "addr16" : "addr32";
+ if (mode_64bit)
+ return (sizeflag & AFLAG) ? "addr32" : "addr64";
+ else
+ return ((sizeflag & AFLAG) && !mode_64bit) ? "addr16" : "addr32";
case FWAIT_OPCODE:
return "fwait";
default:
sizeflag ^= AFLAG;
if (dp->bytemode3 != loop_jcxz_mode || intel_syntax)
{
- if (sizeflag & AFLAG)
+ if ((sizeflag & AFLAG) || mode_64bit)
oappend ("addr32 ");
else
oappend ("addr16 ");
*obufp++ = 'b';
break;
case 'E': /* For jcxz/jecxz */
- if (sizeflag & AFLAG)
- *obufp++ = 'e';
+ if (mode_64bit)
+ {
+ if (sizeflag & AFLAG)
+ *obufp++ = 'r';
+ else
+ *obufp++ = 'e';
+ }
+ else
+ if (sizeflag & AFLAG)
+ *obufp++ = 'e';
used_prefixes |= (prefixes & PREFIX_ADDR);
break;
case 'F':
if ((prefixes & PREFIX_ADDR) || (sizeflag & SUFFIX_ALWAYS))
{
if (sizeflag & AFLAG)
- *obufp++ = 'l';
+ *obufp++ = mode_64bit ? 'q' : 'l';
else
- *obufp++ = 'w';
+ *obufp++ = mode_64bit ? 'l' : 'w';
used_prefixes |= (prefixes & PREFIX_ADDR);
}
break;
disp = 0;
append_seg ();
- if (sizeflag & AFLAG) /* 32 bit address mode */
+ if ((sizeflag & AFLAG) || mode_64bit) /* 32 bit address mode */
{
int havesib;
int havebase;
if ((base & 7) == 5)
{
havebase = 0;
- if (mode_64bit && !havesib)
+ if (mode_64bit && !havesib && (sizeflag & AFLAG))
riprel = 1;
disp = get32s ();
}
if (!havesib && (rex & REX_EXTZ))
base += 8;
if (havebase)
- oappend (mode_64bit ? names64[base] : names32[base]);
+ oappend (mode_64bit && (sizeflag & AFLAG)
+ ? names64[base] : names32[base]);
if (havesib)
{
if (index != 4)
*obufp = '\0';
}
sprintf (scratchbuf, "%s",
- mode_64bit ? names64[index] : names32[index]);
+ mode_64bit && (sizeflag & AFLAG)
+ ? names64[index] : names32[index]);
}
else
sprintf (scratchbuf, ",%s",
- mode_64bit ? names64[index] : names32[index]);
+ mode_64bit && (sizeflag & AFLAG)
+ ? names64[index] : names32[index]);
oappend (scratchbuf);
}
if (!intel_syntax
append_seg ();
- if (sizeflag & AFLAG)
+ if ((sizeflag & AFLAG) || mode_64bit)
off = get32 ();
else
off = get16 ();
USED_REX (REX_MODE64);
if (rex & REX_MODE64)
- s = names64[code - eAX_reg];
+ {
+ if (!(sizeflag & AFLAG))
+ s = names32[code - eAX_reg];
+ else
+ s = names64[code - eAX_reg];
+ }
else if (sizeflag & AFLAG)
s = names32[code - eAX_reg];
else