aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2006-11-16 07:22:25 +0000
committerNathan Sidwell <nathan@codesourcery.com>2006-11-16 07:22:25 +0000
commit869ddf2a184e309b1deb9a8188dac514de6c4261 (patch)
tree127a13a32aa4ffdf0710d171c1460cfcece2895c /gas
parent41c55c875aae843a3d8830cd23ff9265ba262ae8 (diff)
downloadgdb-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')
-rw-r--r--gas/config/tc-m68k.c36
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/m68k/all.exp1
-rw-r--r--gas/testsuite/gas/m68k/mcf-trap.d15
-rw-r--r--gas/testsuite/gas/m68k/mcf-trap.s9
5 files changed, 49 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)
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index dce5cb4..95e184a 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2006-11-16 Nathan Sidwell <nathan@codesourcery.com>
+
+ * gas/m68k/all.exp: Add mcf-trap.
+ * gas/m68k/mcf-trap.[sd]: New.
+
2006-11-15 Jan Beulich <jbeulich@novell.com>
* gas/elf/equ-reloc.[sd]: New.
diff --git a/gas/testsuite/gas/m68k/all.exp b/gas/testsuite/gas/m68k/all.exp
index 9516b1a..7d54f93 100644
--- a/gas/testsuite/gas/m68k/all.exp
+++ b/gas/testsuite/gas/m68k/all.exp
@@ -39,6 +39,7 @@ if [istarget m68*-*-*] then {
run_dump_test mcf-mac
run_dump_test mcf-emac
run_dump_test mcf-fpu
+ run_dump_test mcf-trap
run_dump_test arch-cpu-1
set testname "68000 operands"
diff --git a/gas/testsuite/gas/m68k/mcf-trap.d b/gas/testsuite/gas/m68k/mcf-trap.d
new file mode 100644
index 0000000..f899b69
--- /dev/null
+++ b/gas/testsuite/gas/m68k/mcf-trap.d
@@ -0,0 +1,15 @@
+#name: mcf-trap
+#objdump: -d
+#as: -m5208
+
+.*: file format .*
+
+Disassembly of section .text:
+
+0+ <.text>:
+[ 0-9a-f]+: 51fc tpf
+[ 0-9a-f]+: 51fa 1234 tpfw #4660
+[ 0-9a-f]+: 51fb 1234 5678 tpfl #305419896
+[ 0-9a-f]+: 51fc tpf
+[ 0-9a-f]+: 51fa 1234 tpfw #4660
+[ 0-9a-f]+: 51fb 1234 5678 tpfl #305419896
diff --git a/gas/testsuite/gas/m68k/mcf-trap.s b/gas/testsuite/gas/m68k/mcf-trap.s
new file mode 100644
index 0000000..a5d6acc
--- /dev/null
+++ b/gas/testsuite/gas/m68k/mcf-trap.s
@@ -0,0 +1,9 @@
+ # the m68k compatible names
+ trapf
+ trapf.w #0x1234
+ trapf.l #0x12345678
+
+ # the coldfire specific names
+ tpf
+ tpf.w #0x1234
+ tpf.l #0x12345678