From 934afcd4342d23d936f4f74c26cfa9aef55df619 Mon Sep 17 00:00:00 2001 From: John Gilmore Date: Wed, 5 Aug 1992 08:59:10 +0000 Subject: [PATCH] * 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. --- gas/config/ChangeLog | 7 +++++-- gas/config/tc-m68k.c | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gas/config/ChangeLog b/gas/config/ChangeLog index d334c7471e7..f085b34166f 100644 --- a/gas/config/ChangeLog +++ b/gas/config/ChangeLog @@ -1,8 +1,12 @@ +Wed Aug 5 01:54:34 1992 John Gilmore (gnu at cygnus.com) + + * tc-m68k.c (try_index): Error if index scaling specified and + assembling for an older CPU than a 68020. + Mon Jul 6 17:09:32 1992 Steve Chamberlain (sac@cygnus.com) * obj-coffbfd.c (fill_section): mark .lit sections as STYP_LIT - Tue Jun 9 07:50:46 1992 Steve Chamberlain (sac@thepub.cygnus.com) * tc-m68k.c (m68kip): Fix typo so that only arch's >=68020 do @@ -21,7 +25,6 @@ Mon May 4 18:56:19 1992 Steve Chamberlain (sac@thepub.cygnus.com) * obj-coffbfd.c: use is a synonym for section, (do_relocs_for): calc the base of relocs correctly. * tc-a29k.c (parse_operand): allow expressions to be in any section. - Thu Mar 12 04:42:38 1992 K. Richard Pixley (rich@cygnus.com) diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c index 15bdf999c6a..7ccd0031e70 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: -- 2.30.2