diff options
author | Jan Hubicka <jh@suse.cz> | 2001-02-01 15:30:55 +0000 |
---|---|---|
committer | Jan Hubicka <jh@suse.cz> | 2001-02-01 15:30:55 +0000 |
commit | c361d98b7d0929641f61cbc373a3d8a6e783c98a (patch) | |
tree | 2ccc11de31b855ab7e98b7f36699daf089dc0f70 /opcodes | |
parent | 2ccc319f56df8ea51018d4088d8c52aca98f3951 (diff) | |
download | gdb-c361d98b7d0929641f61cbc373a3d8a6e783c98a.tar.gz |
* (dis386_att, grps): Use 'T' for push/pop
(putop): Handle 'T', alphabetize order, fix 'I' handling in Intel syntax
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 5 | ||||
-rw-r--r-- | opcodes/i386-dis.c | 65 |
2 files changed, 48 insertions, 22 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 56091612889..acd6ca5aa9f 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 5667d77cdaa..90794c031e4 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); |