This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
971023 CPU32 patch
- To: egcs at cygnus dot com
- Subject: 971023 CPU32 patch
- From: Robin Kirkham <Robin dot Kirkham at mlb dot dmt dot csiro dot au>
- Date: Fri, 24 Oct 1997 18:59:00 +1000
Herewith a patch for impoving egcs's external behaviour with respect to the
CPU32, in generic cross-compiler configurations (e.g., m68k-coff):
o the flag -mcpu32 by default no longer emits 68881 floating-point
instructions
o -mcpu32 defines preprocessor symbols __mcpu32__, __mcpu32 (and mcpu32,
without -ansi, as per normal)
o -m68332 still works, but is now redundant. It defines __m68332__ and so
on, along with __mcpu32__ etc but is otherwise the same as -mcpu32
o the CPU32 now has its own multilib
o a redundant m68000/msoft-float multilib is no longer built
I think the redundant -m68332 and -m68302 flags could be removed (-m68302 is
already identical to -m68000, except for a preprocessor symbol). I was talked
out of providing -m switches for the whole 683xx family, and I think it
should be "all or none".
This patch does not alter the internal gcc code-generator behavour, in so
far as it still regards the CPU32 as a 68020 variant, equivalent to by
default -m68020 -mno-bitfields -msoft-float.
For this patch to work, you need to use a very recent binutils snapshot, or
apply the binutils-2.8.1 patch below. This is to prevent gas complaining
about certain "tst.l %a0" instructions.
I've tested this patch on egcs 971023 and 971016.
Robin Kirkham CSIRO Manufacturing Science and Technology
Project Engineer Locked Bag 9, Preston 3072, Australia
robin.kirkham@mlb.dmt.csiro.au Phone: +61 3 9662-7756 Fax: +61 3 9662-7851
Fri Oct 24 13:00:23 EAST 1997 Robin Kirkham <rjk@mlb.dmt.csiro.au>
* config/m68k/m68k.h (TARGET_SWITCHES): -mcpu32 now clears
MASK_68881; (MACHINE_STATE_m68010_up): Replaced __mc68332__
with __mcpu32__
* config/m68k/m68k-none.h: Brought CPP_FPU_SPEC, CPP_SPEC, ASM_SPEC,
and CC1_SPEC in to line with TARGET_SWITCHES; in CPP_SPEC -m68332
defines both __mc68332__ and __mcpu32__ for compatibility
* config/m68k/t-m68kbare (MULTILIB_OPTIONS): added mcpu32;
(MULTILIB_MATCHES): -m68332 now uses mcpu32 libraries, not m68000;
(MULTILIB_EXCEPTIONS): don't build 68881 libraries for m68000,
mcpu32 or m5200
* longlong.h: Replaced __mc68332__ with __mcpu32__
* invoke.texi: Added documentation of -mcpu32 flag; added lists of
applicable processors for -m68000 and -mcpu32
CPU32-PATCH
Return-Path: <owner-crossgcc@cygnus.com>
Delivered-To: robin.kirkham@mlb.dmt.csiro.au
Received: (qmail 16810 invoked from network); 22 Oct 1997 23:04:01 -0000
Received: from runyon.cygnus.com (HELO cygnus.com) (205.180.230.5)
by ragnarok.mlb.dmt.csiro.au with SMTP; 22 Oct 1997 23:04:01 -0000
Received: (from majordom@localhost)
by runyon.cygnus.com (8.8.7-cygnus/8.8.7) id KAA26227;
Wed, 22 Oct 1997 10:35:59 -0700 (PDT)
Received: from tweedledumb.cygnus.com (tweedledumb.cygnus.com [192.80.44.1])
by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id KAA26222;
Wed, 22 Oct 1997 10:35:57 -0700 (PDT)
Received: from subrogation.cygnus.com (subrogation.cygnus.com [192.80.44.76])
by tweedledumb.cygnus.com (8.8.5/8.8.5) with ESMTP id NAA02459;
Wed, 22 Oct 1997 13:35:27 -0400 (EDT)
Received: (ian@localhost) by subrogation.cygnus.com (950413.SGI.8.6.12/8.6.4)
id NAA07984; Wed, 22 Oct 1997 13:35:27 -0400
Date: Wed, 22 Oct 1997 13:35:27 -0400
Message-Id: <199710221735.NAA07984@subrogation.cygnus.com>
From: Ian Lance Taylor <ian@cygnus.com>
To: M.S.Phillips@nortel.co.uk
CC: Robin.Kirkham@mlb.dmt.csiro.au, wilson@cygnus.com, crossgcc@cygnus.com,
bug-gnu-utils@prep.ai.mit.edu
In-reply-to:
<Pine.HPP.3.95q.971022173452.447G-100000@bharh59a.europe.nortel.com>
(message from Mark Phillips on Wed, 22 Oct 1997 17:41:31 +0100 (BST))
Subject: Re: gas 2.8.1 CPU32 bug (Was: as: unrecognized option `-c68020')
Sender: owner-crossgcc@cygnus.com
Precedence: bulk
Reply-To: Ian Lance Taylor <ian@cygnus.com>
X-UIDL: 429e624b8c5278cbd30f2e6136c2979d
Status: U
Date: Wed, 22 Oct 1997 17:41:31 +0100 (BST)
From: Mark Phillips <M.S.Phillips@nortel.co.uk>
Does anyone know what the offical patch is that made it into the beta
binutils?
This is the patch which was checked in.
Ian Taylor
ian@cygnus.com
Index: m68k-opc.c
===================================================================
RCS file: /cvs/cvsfiles/devo/opcodes/m68k-opc.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- m68k-opc.c 1997/09/24 17:09:48 1.36
+++ m68k-opc.c 1997/09/24 17:41:04 1.37
@@ -1858,11 +1858,11 @@
{"trapv", one(0047166), one(0177777), "", m68000up },
-{"tstb", one(0045000), one(0177700), ";b", m68020up | mcf5200 },
+{"tstb", one(0045000), one(0177700), ";b", m68020up|cpu32|mcf5200 },
{"tstb", one(0045000), one(0177700), "@b", m68000up },
-{"tstw", one(0045100), one(0177700), "*w", m68020up | mcf5200 },
+{"tstw", one(0045100), one(0177700), "*w", m68020up|cpu32|mcf5200 },
{"tstw", one(0045100), one(0177700), "@w", m68000up },
-{"tstl", one(0045200), one(0177700), "*l", m68020up | mcf5200 },
+{"tstl", one(0045200), one(0177700), "*l", m68020up|cpu32|mcf5200 },
{"tstl", one(0045200), one(0177700), "@l", m68000up },
{"unlk", one(0047130), one(0177770), "As", m68000up | mcf5200 },