Commit 0e5a4ad8 by Eric Christopher

mips.md: Add unspec #2.

2001-09-15  Eric Christopher  <echristo@redhat.com>

	* config/mips/mips.md: Add unspec #2.
	(reload_indi): Use.
	(reload_outdi): Ditto.
	(reload_outsi): Ditto.
	(HILO_delay): New.

2001-09-15  Eric Christopher  <echristo@redhat.com>
	    Jason Eckhardt  <jle@redhat.com>

	* config.gcc: Add mipsisa32 target and mipsisa32-linux target.
	* config/mips/isa32-linux.h: New file.
	* config/mips/isa3264.h: Ditto.
	* config/mips/mips-protos.h: Add mips_hard_regno_nregs.
	* config/mips/mips.c (mips_hard_regno_nregs): Move here from mips.h.
	(output_block_mode): Support MEABI.
	(function_arg): Ditto. Fix floating point arg passing.
	(mips_va_start): Ditto.
	(override_options): Add isas 32 and 64, meabi, mips32 and mips64
	processors.
	(mips_asm_file_start): Add new section to pass abi to gdb.
	(function_arg_pass_by_reference): Support MEABI.
	(mips_parse_cpu): Support mips32 and mips64 processors.
	* config/mips/mips.h: Support ABI_MEABI, TARGET_MIPS4KC,
	TARGET_MIPS5KC.  Support isa32 and isa64.
	(processor_type): Add r4kc, r5kc, r20kc.
	(GENERATE_MULT3_SI): New.
	(GENERATE_MULT3_DI): Ditto.
	(GENERATE_MULT3): Remove.
	(ISA_HAS_64BIT_REGS): Add isa == 64.
	(ISA_HAS_8CC): Add mips_isa = 32 and 64.
	(ISA_HAS_MADD_MSUB): New.
	(ISA_HAS_CLZ_CLO): Ditto.
	(ISA_HAS_DCLZ_DCLO): Ditto.
	(ABI_GAS_ASM_SPEC): New.
	(GAS_ASM_SPEC): Use. Add support for mips32, mips64.
	(ASM_SPEC): Ditto.
	(LINK_SPEC): Ditto.
	(SUBTARGET_CC1_SPEC): Ditto.
	(SUBTARGET_CPP_SIZE_SPEC): Ditto.
	(PAD_VARARGS_DOWN): Support MEABI.
	(HARD_REGNO_NREGS): Move to mips.c.
	(ASM_OUTPUT_IDENT): Add #undef.
	* config/mips/mips.md: Add r4kc, r5kc, r20kc.
	(mulsi3): Use GENERATE_MULT3_SI.
	(mulsi3_mult3): Ditto.  Support mips32, mips64.
	(mul_acc_si): Use ISA_HAS_MADD_MSUB.
	(mul_sub_si): New pattern.
	(unnamed splitters): New.
	(muldi3): Use GENERATE_MULT3_DI.
	(muldi3_internal2): Ditto.
	(movdicc): Support mips32.
	* config/mips/t-isa3264: New file.

From-SVN: r45623
parent 9a5257d5
2001-09-15 Eric Christopher <echristo@redhat.com>
* config/mips/mips.md: Add unspec #2.
(reload_indi): Use.
(reload_outdi): Ditto.
(reload_outsi): Ditto.
(HILO_delay): New.
2001-09-15 Eric Christopher <echristo@redhat.com>
Jason Eckhardt <jle@redhat.com>
* config.gcc: Add mipsisa32 target and mipsisa32-linux target.
* config/mips/isa32-linux.h: New file.
* config/mips/isa3264.h: Ditto.
* config/mips/mips-protos.h: Add mips_hard_regno_nregs.
* config/mips/mips.c (mips_hard_regno_nregs): Move here from mips.h.
(output_block_mode): Support MEABI.
(function_arg): Ditto. Fix floating point arg passing.
(mips_va_start): Ditto.
(override_options): Add isas 32 and 64, meabi, mips32 and mips64
processors.
(mips_asm_file_start): Add new section to pass abi to gdb.
(function_arg_pass_by_reference): Support MEABI.
(mips_parse_cpu): Support mips32 and mips64 processors.
* config/mips/mips.h: Support ABI_MEABI, TARGET_MIPS4KC,
TARGET_MIPS5KC. Support isa32 and isa64.
(processor_type): Add r4kc, r5kc, r20kc.
(GENERATE_MULT3_SI): New.
(GENERATE_MULT3_DI): Ditto.
(GENERATE_MULT3): Remove.
(ISA_HAS_64BIT_REGS): Add isa == 64.
(ISA_HAS_8CC): Add mips_isa = 32 and 64.
(ISA_HAS_MADD_MSUB): New.
(ISA_HAS_CLZ_CLO): Ditto.
(ISA_HAS_DCLZ_DCLO): Ditto.
(ABI_GAS_ASM_SPEC): New.
(GAS_ASM_SPEC): Use. Add support for mips32, mips64.
(ASM_SPEC): Ditto.
(LINK_SPEC): Ditto.
(SUBTARGET_CC1_SPEC): Ditto.
(SUBTARGET_CPP_SIZE_SPEC): Ditto.
(PAD_VARARGS_DOWN): Support MEABI.
(HARD_REGNO_NREGS): Move to mips.c.
(ASM_OUTPUT_IDENT): Add #undef.
* config/mips/mips.md: Add r4kc, r5kc, r20kc.
(mulsi3): Use GENERATE_MULT3_SI.
(mulsi3_mult3): Ditto. Support mips32, mips64.
(mul_acc_si): Use ISA_HAS_MADD_MSUB.
(mul_sub_si): New pattern.
(unnamed splitters): New.
(muldi3): Use GENERATE_MULT3_DI.
(muldi3_internal2): Ditto.
(movdicc): Support mips32.
* config/mips/t-isa3264: New file.
2001-09-15 Hans-Peter Nilsson <hp@axis.com> 2001-09-15 Hans-Peter Nilsson <hp@axis.com>
* rtl.h (FIND_REG_INC_NOTE) [HAVE_PRE_INCREMENT * rtl.h (FIND_REG_INC_NOTE) [HAVE_PRE_INCREMENT
...@@ -81,7 +136,7 @@ Fri Sep 14 13:54:50 EDT 2001 John Wehle (john@feith.com) ...@@ -81,7 +136,7 @@ Fri Sep 14 13:54:50 EDT 2001 John Wehle (john@feith.com)
not already defined. not already defined.
* config/arm/conix-elf.h: (USER_LABEL_PREFIX, * config/arm/conix-elf.h: (USER_LABEL_PREFIX,
LOCAL_LABEL_PREFIX, MAKE_DECL_ONE_ONLY, UNIQUE_SECTION): LOCAL_LABEL_PREFIX, MAKE_DECL_ONE_ONLY, UNIQUE_SECTION):
Remove duplicate definition. Remove duplicate definition.
(READONLY_DATA_SECTION, SUBTARGET_EXTRA_SECTION, (READONLY_DATA_SECTION, SUBTARGET_EXTRA_SECTION,
(SUBTARGET_EXTRA_SECTION_FUNCTION, RDATA_SECTION_ASM_OP, (SUBTARGET_EXTRA_SECTION_FUNCTION, RDATA_SECTION_ASM_OP,
(RDATA_SECTION_FUNCTION): Remove redundant definition. (RDATA_SECTION_FUNCTION): Remove redundant definition.
...@@ -113,6 +168,7 @@ Fri Sep 14 13:54:50 EDT 2001 John Wehle (john@feith.com) ...@@ -113,6 +168,7 @@ Fri Sep 14 13:54:50 EDT 2001 John Wehle (john@feith.com)
* crti.asm: New file. * crti.asm: New file.
* crtn.asm: New file. * crtn.asm: New file.
>>>>>>> 1.11331
2001-09-13 Neil Booth <neil@daikokuya.demon.co.uk> 2001-09-13 Neil Booth <neil@daikokuya.demon.co.uk>
* c-parse.in (_yylex): Use _cpp_backup_tokens. * c-parse.in (_yylex): Use _cpp_backup_tokens.
...@@ -170,7 +226,7 @@ Fri Sep 14 13:54:50 EDT 2001 John Wehle (john@feith.com) ...@@ -170,7 +226,7 @@ Fri Sep 14 13:54:50 EDT 2001 John Wehle (john@feith.com)
* sdbout.c (plain_type_1, sdbout_end_function, * sdbout.c (plain_type_1, sdbout_end_function,
sdbout_end_epilogue): Likewise. sdbout_end_epilogue): Likewise.
* varasm.c (decode_reg_name): Likewise. * varasm.c (decode_reg_name): Likewise.
* 1750a.c (mod_regno_adjust): Likewise. * 1750a.c (mod_regno_adjust): Likewise.
* alpha.c (alpha_write_one_linkage, * alpha.c (alpha_write_one_linkage,
unicosmk_output_default_externs): Likewise. unicosmk_output_default_externs): Likewise.
...@@ -225,7 +281,7 @@ Fri Sep 14 13:54:50 EDT 2001 John Wehle (john@feith.com) ...@@ -225,7 +281,7 @@ Fri Sep 14 13:54:50 EDT 2001 John Wehle (john@feith.com)
* fixinc/inclhack.def(hpux11_size_t): Keep HP-UX headers from * fixinc/inclhack.def(hpux11_size_t): Keep HP-UX headers from
defining __size_t and leaving size_t undefined. defining __size_t and leaving size_t undefined.
2001-09-12 Diego Novillo <dnovillo@redhat.com> 2001-09-12 Diego Novillo <dnovillo@redhat.com>
* basic-block.h (expunge_block): Declare. * basic-block.h (expunge_block): Declare.
...@@ -264,7 +320,7 @@ Fri Sep 14 13:54:50 EDT 2001 John Wehle (john@feith.com) ...@@ -264,7 +320,7 @@ Fri Sep 14 13:54:50 EDT 2001 John Wehle (john@feith.com)
* toplev.c (decode_g_option): Likewise. * toplev.c (decode_g_option): Likewise.
* tradcpp.c (output_deps): Likewise. * tradcpp.c (output_deps): Likewise.
* varasm.c (decode_reg_name): Likewise. * varasm.c (decode_reg_name): Likewise.
* arm.c (arm_condition_codes, strings_fpa, thumb_condition_code): * arm.c (arm_condition_codes, strings_fpa, thumb_condition_code):
Const-ification. Const-ification.
* arm.md: Likewise. * arm.md: Likewise.
...@@ -514,7 +570,7 @@ Tue Sep 11 11:37:52 CEST 2001 Jan Hubicka <jh@suse.cz> ...@@ -514,7 +570,7 @@ Tue Sep 11 11:37:52 CEST 2001 Jan Hubicka <jh@suse.cz>
Unicos/Mk versions. Unicos/Mk versions.
(*divmodsi_internal, *divmoddi_internal): Disable for (*divmodsi_internal, *divmoddi_internal): Disable for
TARGET_ABI_UNICOSMK. TARGET_ABI_UNICOSMK.
(unaligned_extend?idi, unaligned_load?i, unaligned_store?i): Split in (unaligned_extend?idi, unaligned_load?i, unaligned_store?i): Split in
little-endian and big-endian versions. little-endian and big-endian versions.
(ext, ins, msk): Likewise. (ext, ins, msk): Likewise.
(extv, extzv, insv): Support big-endian mode. (extv, extzv, insv): Support big-endian mode.
......
...@@ -92,10 +92,10 @@ ...@@ -92,10 +92,10 @@
# #
# c_target_objs List of extra target-dependant objects that be # c_target_objs List of extra target-dependant objects that be
# linked into the C compiler only. # linked into the C compiler only.
# #
# cxx_target_objs List of extra target-dependant objects that be # cxx_target_objs List of extra target-dependant objects that be
# linked into the C++ compiler only. # linked into the C++ compiler only.
# #
# build_xm_defines List of macros to define when compiling for the # build_xm_defines List of macros to define when compiling for the
# build machine. # build machine.
# #
...@@ -252,7 +252,7 @@ case $machine in ...@@ -252,7 +252,7 @@ case $machine in
*-*-*aout*) *-*-*aout*)
use_collect2=yes use_collect2=yes
;; ;;
esac esac
# Common parts for GNU/Linux, GNU/Hurd, OpenBSD and FreeBSD systems. # Common parts for GNU/Linux, GNU/Hurd, OpenBSD and FreeBSD systems.
case $machine in case $machine in
...@@ -401,7 +401,7 @@ a29k-*-*) # Default a29k environment. ...@@ -401,7 +401,7 @@ a29k-*-*) # Default a29k environment.
alpha*-*-unicosmk*) alpha*-*-unicosmk*)
use_collect2=yes use_collect2=yes
tm_file="${tm_file} alpha/unicosmk.h" tm_file="${tm_file} alpha/unicosmk.h"
# Don't include t-ieee for now because we don't support that yet # Don't include t-ieee for now because we don't support that yet
# tmake_file="alpha/t-ieee" # tmake_file="alpha/t-ieee"
tmake_file="alpha/t-unicosmk" tmake_file="alpha/t-unicosmk"
...@@ -471,7 +471,7 @@ alpha*-*-openbsd*) ...@@ -471,7 +471,7 @@ alpha*-*-openbsd*)
target_cpu_default="MASK_GAS" target_cpu_default="MASK_GAS"
tmake_file="alpha/t-alpha alpha/t-ieee" tmake_file="alpha/t-alpha alpha/t-ieee"
;; ;;
alpha*-dec-osf*) alpha*-dec-osf*)
xm_defines=POSIX xm_defines=POSIX
if test x$stabs = xyes if test x$stabs = xyes
...@@ -597,7 +597,7 @@ arm*-*-aout) ...@@ -597,7 +597,7 @@ arm*-*-aout)
arm*-*-ecos-elf) arm*-*-ecos-elf)
tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/ecos-elf.h" tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/ecos-elf.h"
tmake_file=arm/t-arm-elf tmake_file=arm/t-arm-elf
;; ;;
arm*-*-elf) arm*-*-elf)
tm_file="elfos.h arm/unknown-elf.h arm/elf.h" tm_file="elfos.h arm/unknown-elf.h arm/elf.h"
tmake_file=arm/t-arm-elf tmake_file=arm/t-arm-elf
...@@ -634,7 +634,7 @@ c34-convex-*) ...@@ -634,7 +634,7 @@ c34-convex-*)
use_collect2=yes use_collect2=yes
;; ;;
c38-convex-*) c38-convex-*)
target_cpu_default=16 target_cpu_default=16
use_collect2=yes use_collect2=yes
;; ;;
c4x-*-rtems*) c4x-*-rtems*)
...@@ -911,12 +911,12 @@ hppa*-*-lites*) ...@@ -911,12 +911,12 @@ hppa*-*-lites*)
;; ;;
hppa*-*-mpeix*) hppa*-*-mpeix*)
tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-mpeix.h" tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-mpeix.h"
xmake_file=pa/x-pa-mpeix xmake_file=pa/x-pa-mpeix
echo "You must use gas. Assuming it is already installed." echo "You must use gas. Assuming it is already installed."
gas=yes gas=yes
install_headers_dir=install-headers-tar install_headers_dir=install-headers-tar
use_collect2=yes use_collect2=yes
;; ;;
i370-*-opened*) # IBM 360/370/390 Architecture i370-*-opened*) # IBM 360/370/390 Architecture
xm_defines='POSIX FATAL_EXIT_CODE=12' xm_defines='POSIX FATAL_EXIT_CODE=12'
tm_file=i370/oe.h tm_file=i370/oe.h
...@@ -1117,7 +1117,7 @@ i[34567]86-*-linux*aout*) # Intel 80386's running GNU/Linux ...@@ -1117,7 +1117,7 @@ i[34567]86-*-linux*aout*) # Intel 80386's running GNU/Linux
i[34567]86-*-linux*libc1) # Intel 80386's running GNU/Linux i[34567]86-*-linux*libc1) # Intel 80386's running GNU/Linux
# with ELF format using the # with ELF format using the
# GNU/Linux C library 5 # GNU/Linux C library 5
xmake_file=x-linux xmake_file=x-linux
tm_file="i386/i386.h i386/att.h linux.h i386/linux.h" tm_file="i386/i386.h i386/att.h linux.h i386/linux.h"
tmake_file="t-slibgcc-elf-ver t-linux t-linux-gnulibc1 i386/t-crtstuff" tmake_file="t-slibgcc-elf-ver t-linux t-linux-gnulibc1 i386/t-crtstuff"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
...@@ -2215,7 +2215,11 @@ mips*-*-linux*) # Linux MIPS, either endian. ...@@ -2215,7 +2215,11 @@ mips*-*-linux*) # Linux MIPS, either endian.
xmake_file=x-linux xmake_file=x-linux
tm_file="linux.h mips/linux.h" tm_file="linux.h mips/linux.h"
case $machine in case $machine in
mips*el-*) tm_file="mips/little.h $tm_file" ;; mipsisa32el-*)
tm_file="mips/little.h $tm_file mips/isa32-linux.h";;
mipsisa32-*)
tm_file="$tm_file mips/isa32-linux.h";;
mips*el-*) tm_file="mips/little.h $tm_file" ;;
esac esac
tmake_file="t-slibgcc-elf-ver t-linux" tmake_file="t-slibgcc-elf-ver t-linux"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
...@@ -2434,6 +2438,10 @@ mips-*-ecoff*) ...@@ -2434,6 +2438,10 @@ mips-*-ecoff*)
fi fi
tmake_file=mips/t-ecoff tmake_file=mips/t-ecoff
;; ;;
mipsisa32-*-elf*)
tm_file="mips/isa3264.h mips/abi64.h"
tmake_file=mips/t-isa3264
;;
mipsel-*-elf*) mipsel-*-elf*)
tm_file="mips/elfl.h" tm_file="mips/elfl.h"
tmake_file=mips/t-elf tmake_file=mips/t-elf
...@@ -2789,7 +2797,7 @@ rs6000-*-lynxos*) ...@@ -2789,7 +2797,7 @@ rs6000-*-lynxos*)
tmake_file=rs6000/t-rs6000 tmake_file=rs6000/t-rs6000
use_collect2=yes use_collect2=yes
;; ;;
s390-*-linux*) s390-*-linux*)
xmake_file=x-linux xmake_file=x-linux
tm_file=s390/linux.h tm_file=s390/linux.h
tmake_file="t-slibgcc-elf-ver t-linux s390/t-linux" tmake_file="t-slibgcc-elf-ver t-linux s390/t-linux"
...@@ -2798,7 +2806,7 @@ s390-*-linux*) ...@@ -2798,7 +2806,7 @@ s390-*-linux*)
thread_file='posix' thread_file='posix'
fi fi
;; ;;
s390x-*-linux*) s390x-*-linux*)
xmake_file=x-linux xmake_file=x-linux
tm_file=s390/linux64.h tm_file=s390/linux64.h
tmake_file="t-slibgcc-elf-ver t-linux s390/t-linux" tmake_file="t-slibgcc-elf-ver t-linux s390/t-linux"
...@@ -3089,7 +3097,7 @@ sparc86x-*-aout*) ...@@ -3089,7 +3097,7 @@ sparc86x-*-aout*)
tm_file="sparc/sp86x-aout.h aoutos.h libgloss.h" tm_file="sparc/sp86x-aout.h aoutos.h libgloss.h"
tmake_file=sparc/t-sp86x tmake_file=sparc/t-sp86x
;; ;;
sparc86x-*-elf*) sparc86x-*-elf*)
tm_file="sparc/sol2.h sparc./elf.h sparc/sp86x-elf.h" tm_file="sparc/sol2.h sparc./elf.h sparc/sp86x-elf.h"
tmake_file=sparc/t-sp86x tmake_file=sparc/t-sp86x
extra_parts="crtbegin.o crtend.o" extra_parts="crtbegin.o crtend.o"
...@@ -3272,7 +3280,7 @@ alpha*-*-*) ...@@ -3272,7 +3280,7 @@ alpha*-*-*)
target_cpu_default2="MASK_CPU_EV5" target_cpu_default2="MASK_CPU_EV5"
;; ;;
esac esac
if test x$gas = xyes if test x$gas = xyes
then then
if test "$target_cpu_default2" = "" if test "$target_cpu_default2" = ""
......
/* Definitions for MIPS32 running Linux-based GNU systems with ELF format.
Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef TARGET_VERSION
#if TARGET_ENDIAN_DEFAULT == 0
#define TARGET_VERSION fprintf (stderr, " (MIPS32el GNU/Linux with ELF)");
#else
#define TARGET_VERSION fprintf (stderr, " (MIPS32 GNU/Linux with ELF)");
#endif
#undef MIPS_ISA_DEFAULT
#define MIPS_ISA_DEFAULT 32
/* Definitions of target machine for GNU compiler.
MIPS 32 and MIPS 64 version.
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef MIPS_ISA_DEFAULT
#define MIPS_ISA_DEFAULT 32
#endif
#ifndef MIPS_ABI_DEFAULT
#define MIPS_ABI_DEFAULT ABI_MEABI
#endif
#ifndef MIPS_ENABLE_EMBEDDED_O32
#define MIPS_ENABLE_EMBEDDED_O32 1
#endif
#ifndef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
#endif
#include "mips/elf.h"
/* This must be done after including mips.h so that the
ABI_{EABI,O64,O32,...} are #defined. */
#if MIPS_ABI_DEFAULT == ABI_EABI
#undef SUBTARGET_CPP_SIZE_SPEC
#define SUBTARGET_CPP_SIZE_SPEC "\
%{mabi=eabi|!mabi=*:\
%{mips1|mips2|mips32|mlong32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
%{!mips1:%{!mips2:%{!mips32:%{!mlong32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}} \
%{mabi=o64:\
%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \
%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
"
#elif MIPS_ABI_DEFAULT == ABI_O64
#undef SUBTARGET_CPP_SIZE_SPEC
#define SUBTARGET_CPP_SIZE_SPEC "\
%{mabi=eabi:\
%{mips1|mips2|mips32|mlong32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
%{!mips1:%{!mips2:%{!mips32:%{!mlong32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}} \
%{mabi=o64|!mabi=*:\
%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \
%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
"
#elif MIPS_ABI_DEFAULT == ABI_32
#if MIPS_ISA_DEFAULT == 3 || MIPS_ISA_DEFAULT == 4 || MIPS_ISA_DEFAULT == 5 || MIPS_ISA_DEFAULT == 64
#undef SUBTARGET_CPP_SIZE_SPEC
#define SUBTARGET_CPP_SIZE_SPEC "\
%{mabi=eabi:\
%{mips1|mips2|mips32|mlong32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
%{!mips1:%{!mips2:%{!mips32:%{!mlong32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}} \
%{mabi=o64|!!mabi=*:\
%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \
%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
"
#else /* not a 64bit default ISA */
#undef SUBTARGET_CPP_SIZE_SPEC
#define SUBTARGET_CPP_SIZE_SPEC "\
%{mabi=eabi:\
%{mips3|mips4|mips5|mips64|mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
%{!mips3:%{!mips4:%{!mips5:%{!mips64:%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}} \
%{mabi=o64:\
%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \
%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
%{!mabi=*:\
%{mips3|mips4|mips5|mips64:\
%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \
%{!mips3:%{!mips4:%{!mips5:%{!mips64:\
-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}} \
"
#endif /* ISA */
#elif MIPS_ABI_DEFAULT == ABI_MEABI
/* For MEABI, don't link with crt0 files, let the linker start files specify
the appropriate crt0 file. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "crti%O%s crtbegin%O%s %{!mno-crt0: }"
/*
The MIPS_ISA_DEFAULT test is for EABI, in which the size of longs depends on
the ISA.
For MEABI the size of longs is always 32bits. If long64 is specified then
we honor that. The errors for long64 & long32 is because while CC1 can
handle overriding mlong32 with mlong64 and vise-versa, the specs cannot. */
#if MIPS_ISA_DEFAULT == 3 || MIPS_ISA_DEFAULT == 4 || MIPS_ISA_DEFAULT == 5 || MIPS_ISA_DEFAULT == 64
#undef SUBTARGET_CPP_SIZE_SPEC
#define SUBTARGET_CPP_SIZE_SPEC "\
%{mabi=meabi:\
%{mips1|mips2|mips32|mlong32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
%{!mips1:%{!mips2:%{!mips32:%{!mlong32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}} \
%{mabi=o64:\
%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int \
%{mlong32:%e-mlong32 and -mlong64 can not both be specified.}} \
%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int }} \
%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
%{mabi=meabi|!mabi=*:\
%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int \
%{mlong32:%e-mlong32 and -mlong64 can not both be specified.}} \
%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int }} \
"
#else /* not a 64bit default ISA */
#undef SUBTARGET_CPP_SIZE_SPEC
#define SUBTARGET_CPP_SIZE_SPEC "\
%{mabi=meabi:\
%{mips3|mips4|mips5|mips64|mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
%{!mips3:%{!mips4:%{!mips5:%{!mips64:%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}} \
%{mabi=o64:\
%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int \
%{mlong32:%e-mlong32 and -mlong64 can not both be specified.}} \
%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int }} \
%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
%{mabi=meabi|!mabi=*:\
%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int \
%{mlong32:%e-mlong32 and -mlong64 can not both be specified.}} \
%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int }} \
"
#endif /* ISA */
#endif /* ABI */
/* eof */
...@@ -53,6 +53,7 @@ extern int mips_output_external_libcall PARAMS ((FILE *, const char *)); ...@@ -53,6 +53,7 @@ extern int mips_output_external_libcall PARAMS ((FILE *, const char *));
#ifdef TREE_CODE #ifdef TREE_CODE
extern unsigned int mips_hard_regno_nregs PARAMS ((int, enum machine_mode));
extern struct rtx_def * function_arg PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int)); extern struct rtx_def * function_arg PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int));
extern void function_arg_advance PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int)); extern void function_arg_advance PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int));
extern int function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int)); extern int function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int));
......
CONFIG2_H = $(srcdir)/config/mips/isa3264.h $(srcdir)/config/mips/elf.h $(srcdir)/config/mips/ecoff.h $(srcdir)/config/mips/mips.h
# Suppress building libgcc1.a, since the MIPS compiler port is complete
# and does not need anything from libgcc1.a.
LIBGCC1 =
# Don't let CTOR_LIST end up in sdata section.
CRTSTUFF_T_CFLAGS = -G 0
# Assemble startup files.
$(T)crti.o: $(srcdir)/config/mips/crti.asm $(GCC_PASSES)
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
-c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/mips/crti.asm
$(T)crtn.o: $(srcdir)/config/mips/crtn.asm $(GCC_PASSES)
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
-c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/mips/crtn.asm
# When building a cross compiler, put the mips16 support functions in
# libgcc1.a.
CROSS_LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = mips/mips16.S
LIB1ASMFUNCS = _m16addsf3 _m16subsf3 _m16mulsf3 _m16divsf3 \
_m16eqsf2 _m16nesf2 _m16gtsf2 _m16gesf2 _m16lesf2 _m16ltsf2 \
_m16fltsisf _m16fixsfsi \
_m16adddf3 _m16subdf3 _m16muldf3 _m16divdf3 \
_m16extsfdf2 _m16trdfsf2 \
_m16eqdf2 _m16nedf2 _m16gtdf2 _m16gedf2 _m16ledf2 _m16ltdf2 \
_m16fltsidf _m16fixdfsi \
_m16retsf _m16retdf \
_m16stub1 _m16stub2 _m16stub5 _m16stub6 _m16stub9 _m16stub10 \
_m16stubsf0 _m16stubsf1 _m16stubsf2 _m16stubsf5 _m16stubsf6 \
_m16stubsf9 _m16stubsf10 \
_m16stubdf0 _m16stubdf1 _m16stubdf2 _m16stubdf5 _m16stubdf6 \
_m16stubdf9 _m16stubdf10
# We must build libgcc2.a with -G 0, in case the user wants to link
# without the $gp register.
TARGET_LIBGCC2_CFLAGS = -G 0
# fp-bit and dp-bit are really part of libgcc1, but this will cause
# them to be built correctly, so... [taken from t-sparclite]
# We want fine grained libraries, so use the new code to build the
# floating point emulation libraries.
FPBIT = fp-bit.c
DPBIT = dp-bit.c
dp-bit.c: $(srcdir)/config/fp-bit.c
echo '#ifdef __MIPSEL__' > dp-bit.c
echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
echo '#endif' >> dp-bit.c
echo '#define US_SOFTWARE_GOFAST' >> dp-bit.c
cat $(srcdir)/config/fp-bit.c >> dp-bit.c
fp-bit.c: $(srcdir)/config/fp-bit.c
echo '#define FLOAT' > fp-bit.c
echo '#ifdef __MIPSEL__' >> fp-bit.c
echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c
echo '#endif' >> fp-bit.c
echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
# Build the libraries for both hard and soft floating point
MULTILIB_OPTIONS = msoft-float EL/EB mips32/mips64
MULTILIB_DIRNAMES = soft-float el eb mips32 mips64
EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
# Add additional dependencies to recompile selected modules whenever the
# tm.h file changes. The files compiled are:
#
# gcc.c (*_SPEC changes)
# toplev.c (new switches + assembly output changes)
# sdbout.c (debug format changes)
# dbxout.c (debug format changes)
# dwarfout.c (debug format changes)
# final.c (assembly output changes)
# varasm.c (assembly output changes)
# cse.c (cost functions)
# insn-output.c (possible ifdef changes in tm.h)
# regclass.c (fixed/call used register changes)
# cccp.c (new preprocessor macros, -v version #)
# explow.c (GO_IF_LEGITIMATE_ADDRESS)
# recog.c (GO_IF_LEGITIMATE_ADDRESS)
# reload.c (GO_IF_LEGITIMATE_ADDRESS)
gcc.o: $(CONFIG2_H)
toplev.o: $(CONFIG2_H)
sdbout.o: $(CONFIG2_H)
dbxout.o: $(CONFIG2_H)
dwarfout.o: $(CONFIG2_H)
final.o: $(CONFIG2_H)
varasm.o: $(CONFIG2_H)
cse.o: $(CONFIG2_H)
insn-output.o: $(CONFIG2_H)
regclass.o: $(CONFIG2_H)
cccp.o: $(CONFIG2_H)
explow.o: $(CONFIG2_H)
recog.o: $(CONFIG2_H)
reload.o: $(CONFIG2_H)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment