aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-m68k.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1992-08-05 08:59:10 +0000
committerJohn Gilmore <gnu@cygnus>1992-08-05 08:59:10 +0000
commit934afcd4342d23d936f4f74c26cfa9aef55df619 (patch)
tree31a737fb88e81af86ba6db90cf56e7331a1a54dc /gas/config/tc-m68k.c
parent38094c60330686e8f69dfcc8c2c5d2316f622cd1 (diff)
downloadgdb-934afcd4342d23d936f4f74c26cfa9aef55df619.zip
gdb-934afcd4342d23d936f4f74c26cfa9aef55df619.tar.gz
gdb-934afcd4342d23d936f4f74c26cfa9aef55df619.tar.bz2
* tc-m68k.c (try_index): Error if index scaling specified and
assembling for an older CPU than a 68020. This bug was found at Adobe because GAS did not diagnose incorrect 68020 code generated by GCC when compiling for 68010. We had to debug it in the target system as failing instructions.
Diffstat (limited to 'gas/config/tc-m68k.c')
-rw-r--r--gas/config/tc-m68k.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c
index 15bdf99..7ccd003 100644
--- a/gas/config/tc-m68k.c
+++ b/gas/config/tc-m68k.c
@@ -892,6 +892,11 @@ struct m68k_op *opP;
case '2':
case '4':
case '8':
+ if (cpu_of_arch(current_architecture) < m68020) {
+ opP->error="no index scaling in pre-68020's";
+ *s=ss;
+ return FAIL;
+ }
opP->imul= *ss-'0';
break;
default: