diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2006-11-16 07:22:25 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2006-11-16 07:22:25 +0000 |
commit | 869ddf2a184e309b1deb9a8188dac514de6c4261 (patch) | |
tree | 127a13a32aa4ffdf0710d171c1460cfcece2895c /gas/config/tc-m68k.c | |
parent | 41c55c875aae843a3d8830cd23ff9265ba262ae8 (diff) | |
download | gdb-869ddf2a184e309b1deb9a8188dac514de6c4261.zip gdb-869ddf2a184e309b1deb9a8188dac514de6c4261.tar.gz gdb-869ddf2a184e309b1deb9a8188dac514de6c4261.tar.bz2 |
gas/
* config/tc-m68k.c (m68k_ip): Correct output of cpu aliases.
gas/testsuite/
* gas/m68k/all.exp: Add mcf-trap.
* gas/m68k/mcf-trap.[sd]: New.
opcodes/
* m68k-opc.c (m68k_opcodes): Place trap instructions before set
conditionals. Add tpf coldfire instruction as alias for trapf.
Diffstat (limited to 'gas/config/tc-m68k.c')
-rw-r--r-- | gas/config/tc-m68k.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c index 3f4382e..17b9f4f 100644 --- a/gas/config/tc-m68k.c +++ b/gas/config/tc-m68k.c @@ -2061,29 +2061,31 @@ m68k_ip (char *instring) if (!cpu->alias && (cpu->arch & ok_arch)) { const struct m68k_cpu *alias; - + int seen_master = 0; + if (any) APPEND (", "); any = 0; APPEND (cpu->name); - APPEND (" ["); - if (cpu != m68k_cpus) - for (alias = cpu - 1; alias->alias; alias--) + for (alias = cpu; alias != m68k_cpus; alias--) + if (alias[-1].alias >= 0) + break; + for (; !seen_master || alias->alias > 0; alias++) { - if (any) - APPEND (", "); - APPEND (alias->name); - any = 1; + if (!alias->alias) + seen_master = 1; + else + { + if (any) + APPEND (", "); + else + APPEND (" ["); + APPEND (alias->name); + any = 1; + } } - for (alias = cpu + 1; alias->alias; alias++) - { - if (any) - APPEND (", "); - APPEND (alias->name); - any = 1; - } - - APPEND ("]"); + if (any) + APPEND ("]"); any = 1; } if (paren) |