aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-02-01 15:30:55 +0000
committerJan Hubicka <jh@suse.cz>2001-02-01 15:30:55 +0000
commit905308801e2d076e98aa0d099cf486628414051e (patch)
treeb3f86b5905e92bc89c66c1d9137d7f9f48f096ce
parent7fb91dc8bf170f5152af7b1f891b9baad0885302 (diff)
downloadgdb-905308801e2d076e98aa0d099cf486628414051e.zip
gdb-905308801e2d076e98aa0d099cf486628414051e.tar.gz
gdb-905308801e2d076e98aa0d099cf486628414051e.tar.bz2
* (dis386_att, grps): Use 'T' for push/pop
(putop): Handle 'T', alphabetize order, fix 'I' handling in Intel syntax
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/i386-dis.c65
2 files changed, 48 insertions, 22 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 5609161..acd6ca5 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+Thu Feb 1 16:29:06 MET 2001 Jan Hubicka <jh@suse.cz>
+
+ * (dis386_att, grps): Use 'T' for push/pop
+ (putop): Handle 'T', alphabetize order, fix 'I' handling in Intel syntax
+
2001-01-14 Alan Modra <alan@linuxcare.com.au>
* hppa-dis.c (print_insn_hppa): Handle '>' and '<' arg types.
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 5667d77..90794c0 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -436,6 +436,7 @@ struct dis386 {
'Q' => print 'w', 'l' or 'q' if no register operands or suffix_always is true
'R' => print 'w', 'l' or 'q' ("wd" or "dq" in intel mode)
'S' => print 'w', 'l' or 'q' if suffix_always is true
+ 'T' => print 'q' in 64bit mode and behave as 'I' otherwise
'X' => print 's', 'd' depending on data16 prefix (for XMM)
'W' => print 'b' or 'w' ("w" or "de" in intel mode)
*/
@@ -602,7 +603,7 @@ static const struct dis386 dis386_att[] = {
{ "movQ", Ev, Sw, XX },
{ "leaS", Gv, M, XX },
{ "movQ", Sw, Ev, XX },
- { "popQ", Ev, XX, XX },
+ { "popT", Ev, XX, XX },
/* 90 */
{ "nop", XX, XX, XX },
/* FIXME: NOP with REPz prefix is called PAUSE. */
@@ -2442,7 +2443,7 @@ static const struct dis386 grps[][8] = {
{ "lcallI", indirEv, XX, XX },
{ "jmpI", indirEv, XX, XX },
{ "ljmpI", indirEv, XX, XX },
- { "pushQ", Ev, XX, XX },
+ { "pushT", Ev, XX, XX },
{ "(bad)", XX, XX, XX },
},
/* GRP6 */
@@ -3686,6 +3687,27 @@ putop (template, sizeflag)
if (sizeflag & AFLAG)
*obufp++ = 'e';
break;
+ case 'I':
+ if (intel_syntax)
+ break;
+ if (mode_64bit)
+ *obufp++ = 'q';
+ else
+ {
+ if ((prefixes & PREFIX_DATA)
+#ifdef SUFFIX_ALWAYS
+ || (sizeflag & SUFFIX_ALWAYS)
+#endif
+ )
+ {
+ if (sizeflag & DFLAG)
+ *obufp++ = 'l';
+ else
+ *obufp++ = 'w';
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ }
+ }
+ break;
case 'L':
if (intel_syntax)
break;
@@ -3731,9 +3753,9 @@ putop (template, sizeflag)
}
break;
case 'Q':
- USED_REX (REX_MODE64);
if (intel_syntax)
break;
+ USED_REX (REX_MODE64);
if (mod != 3
#ifdef SUFFIX_ALWAYS
|| (sizeflag & SUFFIX_ALWAYS)
@@ -3803,6 +3825,24 @@ putop (template, sizeflag)
}
#endif
break;
+ case 'T':
+ if (intel_syntax)
+ break;
+ if (mode_64bit)
+ *obufp++ = 'q';
+ else if (mod != 3
+#ifdef SUFFIX_ALWAYS
+ || (sizeflag & SUFFIX_ALWAYS)
+#endif
+ )
+ {
+ if (sizeflag & DFLAG)
+ *obufp++ = 'l';
+ else
+ *obufp++ = 'w';
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ }
+ break;
case 'X':
if (prefixes & PREFIX_DATA)
*obufp++ = 'd';
@@ -3811,25 +3851,6 @@ putop (template, sizeflag)
used_prefixes |= (prefixes & PREFIX_DATA);
break;
/* implicit operand size 'l' for i386 or 'q' for x86-64 */
- case 'I':
- if (mode_64bit)
- *obufp++ = 'q';
- else
- {
- if ((prefixes & PREFIX_DATA)
-#ifdef SUFFIX_ALWAYS
- || (sizeflag & SUFFIX_ALWAYS)
-#endif
- )
- {
- if (sizeflag & DFLAG)
- *obufp++ = 'l';
- else
- *obufp++ = 'w';
- used_prefixes |= (prefixes & PREFIX_DATA);
- }
- }
- break;
case 'W':
/* operand size flag for cwtl, cbtw */
USED_REX (0);