From: rsandifo Date: Fri, 12 Jan 2007 09:29:14 +0000 (+0000) Subject: gcc/ X-Git-Tag: upstream/4.9.2~51109 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=79518b076912c54b775785c4cc18adbc2e73419a;p=platform%2Fupstream%2Flinaro-gcc.git gcc/ 200x-xx-xx Richard Sandiford Nathan Sidwell * config/m68k/m68k.h (ASM_CPU_SPEC, ASM_SPEC, EXTRA_SPECS) (SUBTARGET_EXTRA_SPECS): New macros. * config/m68k/linux.h (ASM_SPEC): Remove CPU flags; use %(asm_cpu_spec) instead. * config/m68k/m68k-none.h (ASM_SPEC): Likewise. * config/m68k/openbsd.h (ASM_SPEC): Likewise. * config/m68k/netbsd-elf.h (ASM_SPEC): Likewise. (EXTRA_SPECS): Rename to... (SUBTARGET_EXTRA_SPECS): ...this. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120712 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e1167f1..e7ea8d5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2007-01-12 Richard Sandiford + Nathan Sidwell + + * config/m68k/m68k.h (ASM_CPU_SPEC, ASM_SPEC, EXTRA_SPECS) + (SUBTARGET_EXTRA_SPECS): New macros. + * config/m68k/linux.h (ASM_SPEC): Remove CPU flags; + use %(asm_cpu_spec) instead. + * config/m68k/m68k-none.h (ASM_SPEC): Likewise. + * config/m68k/openbsd.h (ASM_SPEC): Likewise. + * config/m68k/netbsd-elf.h (ASM_SPEC): Likewise. + (EXTRA_SPECS): Rename to... + (SUBTARGET_EXTRA_SPECS): ...this. + 2007-01-12 Nathan Sidwell Richard Sandiford Julian Brown diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h index eacc7fe..b1f9e97 100644 --- a/gcc/config/m68k/linux.h +++ b/gcc/config/m68k/linux.h @@ -23,6 +23,11 @@ Boston, MA 02110-1301, USA. */ #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (68k GNU/Linux with ELF)"); +/* Add %(asm_cpu_spec) to the svr4.h definition of ASM_SPEC. */ +#undef ASM_SPEC +#define ASM_SPEC \ + "%(asm_cpu_spec) %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*}" + /* for 68k machines this only needs to be TRUE for the 68000 */ #undef STRICT_ALIGNMENT @@ -85,13 +90,6 @@ Boston, MA 02110-1301, USA. */ #undef CPP_SPEC #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" -/* We override the ASM_SPEC from svr4.h because we must pass -m68040 down - to the assembler. */ -#undef ASM_SPEC -#define ASM_SPEC \ - "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \ -%{m68040} %{m68060:-m68040}" - /* Provide a LINK_SPEC appropriate for GNU/Linux. Here we provide support for the special GCC options -static and -shared, which allow us to link things in one of these three modes by applying the appropriate diff --git a/gcc/config/m68k/m68k-none.h b/gcc/config/m68k/m68k-none.h index b30fb94..6b30389 100644 --- a/gcc/config/m68k/m68k-none.h +++ b/gcc/config/m68k/m68k-none.h @@ -18,13 +18,9 @@ along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* Pass flags to gas indicating which type of processor we have. */ - #undef ASM_SPEC -#define ASM_SPEC "\ -%{m68851}%{mno-68851}%{m68881}%{mno-68881}%{msoft-float:-mno-68881} %{m68000}%{m68302}%{mc68000}%{m68010}%{m68020}%{mc68020}%{m68030}%{m68040}%{m68020-40:-mc68040} %{m68020-60:-mc68040} %{m68060}%{mcpu32}%{m68332}%{m5200}%{m5206e}%{m528x}%{m5307}%{m5407}%{mcfv4e} \ -%{fPIC:--pcrel} %{fpic:--pcrel} %{msep-data:--pcrel} %{mid-shared-library:--pcrel} \ -" +#define ASM_SPEC "%(asm_cpu_spec) %{fPIC:--pcrel} %{fpic:--pcrel} \ + %{msep-data:--pcrel} %{mid-shared-library:--pcrel}" /* cc1/cc1plus always receives all the -m flags. If the specs strings above are consistent with the flags in m68k.opt, there should be no need for diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h index 5b017e4..de8e27c 100644 --- a/gcc/config/m68k/m68k.h +++ b/gcc/config/m68k/m68k.h @@ -39,6 +39,25 @@ Boston, MA 02110-1301, USA. */ %{!m68332:%{!m5200:%{!m5206e:%{!m528x:%{!m5307:%{!m5407:%{!mcfv4e:\ -%(VALUE)}}}}}}}}}}}}}}}}}}}" }, +/* Pass flags to gas indicating which type of processor we have. This + can be simplified when we can rely on the assembler supporting .cpu + and .arch directives. */ + +#define ASM_CPU_SPEC "\ +%{m68851}%{mno-68851} %{m68881}%{mno-68881} %{msoft-float:-mno-float} \ +%{m68000}%{m68302}%{mc68000}%{m68010}%{m68020}%{mc68020}%{m68030}\ +%{m68040}%{m68020-40:-m68040}%{m68020-60:-m68040}\ +%{m68060}%{mcpu32}%{m68332}%{m5200}%{m5206e}%{m528x}%{m5307}%{m5407}%{mcfv4e}\ +" + +#define ASM_SPEC "%(asm_cpu_spec)" + +#define EXTRA_SPECS \ + { "asm_cpu_spec", ASM_CPU_SPEC }, \ + SUBTARGET_EXTRA_SPECS + +#define SUBTARGET_EXTRA_SPECS + /* Note that some other tm.h files include this one and then override many of the definitions that relate to assembler syntax. */ diff --git a/gcc/config/m68k/netbsd-elf.h b/gcc/config/m68k/netbsd-elf.h index 73673fd..c8dd1b9 100644 --- a/gcc/config/m68k/netbsd-elf.h +++ b/gcc/config/m68k/netbsd-elf.h @@ -46,7 +46,8 @@ Boston, MA 02110-1301, USA. */ #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 80 #endif -#define EXTRA_SPECS \ +#undef SUBTARGET_EXTRA_SPECS +#define SUBTARGET_EXTRA_SPECS \ { "netbsd_entry_point", NETBSD_ENTRY_POINT }, @@ -66,13 +67,11 @@ Boston, MA 02110-1301, USA. */ #define CPP_SPEC NETBSD_CPP_SPEC -/* Provide an ASM_SPEC appropriate for NetBSD m68k ELF targets. We pass - on some CPU options, as well as PIC code generation options. */ +/* Provide an ASM_SPEC appropriate for NetBSD m68k ELF targets. We need + to passn PIC code generation options. */ #undef ASM_SPEC -#define ASM_SPEC \ - "%{m68010} %{m68020} %{m68030} %{m68040} %{m68060} \ - %{fpic|fpie:-k} %{fPIC|fPIE:-k -K}" +#define ASM_SPEC "%(asm_cpu_spec) %{fpic|fpie:-k} %{fPIC|fPIE:-k -K}" #define AS_NEEDS_DASH_FOR_PIPED_INPUT diff --git a/gcc/config/m68k/openbsd.h b/gcc/config/m68k/openbsd.h index 20cdc6f..2bc0af5 100644 --- a/gcc/config/m68k/openbsd.h +++ b/gcc/config/m68k/openbsd.h @@ -34,9 +34,8 @@ Boston, MA 02110-1301, USA. */ #undef CPP_SPEC #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}" -/* m68k as needs to know about the processor subtype. */ #undef ASM_SPEC -#define ASM_SPEC "%{m68030} %{m68040} %{m68060} %{fpic|fpie:-k} %{fPIC|fPIE:-k -K}" +#define ASM_SPEC "%(asm_cpu_spec) %{fpic|fpie:-k} %{fPIC|fPIE:-k -K}" #define AS_NEEDS_DASH_FOR_PIPED_INPUT