2004-08-11 04:50:14 +02:00
|
|
|
/* Configuration file for ARM BPABI targets.
|
crtstuff.c, [...]: Update copyright.
* crtstuff.c, integrate.h, tree-scalar-evolution.h,
config/alpha/unicosmk.h, config/arc/arc.md,
config/arm/bpabi.h, config/arm/coff.h, config/arm/elf.h,
config/arm/ieee754-df.S, config/arm/ieee754-sf.S,
config/arm/netbsd.h, config/arm/pe.c, config/arm/pe.h,
config/arm/semi.h, config/arm/uclinux-elf.h,
config/arm/wince-pe.h, config/fr30/fr30.c,
config/rs6000/altivec.h: Update copyright.
From-SVN: r99447
2005-05-09 18:26:26 +02:00
|
|
|
Copyright (C) 2004, 2005
|
2004-08-11 04:50:14 +02:00
|
|
|
Free Software Foundation, Inc.
|
|
|
|
Contributed by CodeSourcery, LLC
|
|
|
|
|
|
|
|
This file is part of GCC.
|
|
|
|
|
|
|
|
GCC 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.
|
|
|
|
|
|
|
|
GCC 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 GCC; see the file COPYING. If not, write to
|
2005-06-25 03:22:41 +02:00
|
|
|
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02110-1301, USA. */
|
2004-08-11 04:50:14 +02:00
|
|
|
|
|
|
|
/* Use the AAPCS ABI by default. */
|
|
|
|
#define ARM_DEFAULT_ABI ARM_ABI_AAPCS
|
|
|
|
|
|
|
|
/* Assume that AAPCS ABIs should adhere to the full BPABI. */
|
|
|
|
#define TARGET_BPABI (TARGET_AAPCS_BASED)
|
|
|
|
|
Makefile.in: Set and use UNWIND_H.
2005-06-28 Paul Brook <paul@codesourcery.com>
gcc/
* Makefile.in: Set and use UNWIND_H. Install as unwind.h.
* c-decl.c (finish_decl): Call default_init_unwind_resume_libfunc.
* except.c (add_ehspec_entry): Generate arm eabi filter lists.
(assign_filter_values): Ditto.
(output_ttype): New function.
(output_function_exception_table): Use output_ttype. Generate arm
eabi filter lists.
(default_init_unwind_resume_libfunc): New function.
* except.h (default_init_unwind_resume_libfunc): Add prototype.
* optabs.c (init_optabs): Don't set unwind_resume_libfunc.
* opts.c (decode_options): Use targetm.unwind_tables_default.
* target-def.h (TARGET_ASM_TTYPE): Provide and use definition.
(TARGET_ARM_EABI_UNWINDER, TARGET_UNWIND_TABLES_DEFAULT): Ditto.
* target.h (struct gcc_target): Add asm.ttype, unwind_tables_default
and arm_eabi_unwinder.
* unwind-c.c: Support Arm EABI unwinder.
* unwind.h: Rename ...
* unwind-generic.h: ... To this.
* doc/tm.texi (TARGET_ASM_TTYPE, TARGET_ARM_EABI_UNWINDER): Document.
(TARGET_UNWID_TABLES_DEFAULT): Document.
* config/arm/arm-protos.h (arm_output_fn_unwind): Add prototype.
* config/arm/arm.c (arm_unwind_emit, arm_output_ttype): New functions.
(TARGET_UNWIND_EMIT, TARGET_ASM_TTYPE, TARGET_ARM_EABI_UNWINDER):
Define.
(thumb_pushpop, thumb_output_function_prologue): Output unwinding
directives.
(arm_unwind_emit_stm, arm_unwind_emit_set): New functions.
* config/arm/arm.h (MUST_USE_SJLJ_EXCEPTIONS): Only define when
!TARGET_UNWIND_INFO.
(ARM_OUTPUT_FN_UNWIND, ARM_EABI_UNWIND_TABLES): Define.
* config/arm/bpabi.h (TARGET_UNWIND_INFO): Define.
* config/arm/elf.h (ASM_DECLARE_FUNCTION_NAME,
ASM_DECLARE_FUNCTION_SIZE): Use ARM_OUTPUT_FN_UNWIND.
* config/arm/lib1funcs.asm: Include libunwind.S.
* config/arm/libgcc-bpabi.ver: Add unwinding routines.
* config/arm/libunwind.S: New file.
* config/arm/pr-support.c: New file.
* config/arm/t-bpabi (LIB1ASMFUNCS): Add _unwind.
(UNWIND_H, LIB2ADDEH, LIB2ADDEHDEP): Set.
* config/arm/t-symbian (UNWIND_H, LIB2ADDEH, LIB2ADDEHDEP): Set.
* config/arm/unwind-arm.c: New file.
* config/arm/unwind-arm.h: New file.
* config/i386/t-netware (USER_H): Remove unwind.h.
* config/ia64/ia64.h (TARGET_UNWIND_TABLES_DEFAULT): Define.
gcc/cp/
* Make-lang.in (cp/except.o): Depend on $(TARGET_H)
* except.c: Include target.h.
(init_exception_processing): Initialize unwind_resume_libfunc.
* doc/tm.texi: Document TARGET_ASM_TTYPE
gcc/ada/
* misc.c (gnat_init_gcc_eh): Call default_init_unwind_resume_libfunc.
gcc/java/
* decl.c (java_init_decl_processing): Call
default_init_unwind_resume_libfunc.
gcc/objc/
* objc-act.c (objc_init_exceptions): Call
default_init_unwind_resume_libfunc.
libstdc++/
* acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Check for
__cxa_end_cleanup.
* libsupc++/Makefile.am (sources): Add eh_call.c and eh_arm.c.
* libsupc++/eh_arm.cc: New file.
* libsupc++/eh_call.cc: New file.
* libsupc++/eh_catch.cc (__cxa_get_exception_ptr): Use
__gxx_caught_object.
(__cxa_begin_catch): Ditto. Use __is_gxx_exception_class. Call
_Unwind_Complete when using the ARM EABI.
(__cxa_end_catch): Use __is_gxx_exception_class.
* libsupc++/eh_personality.cc: Define NO_SIZE_OF_ENCODED_VALUE when
using the ARM EABI.
(save_caught_exception, restore_caught_exception): New functions.
(_throw_typet): New typedef.
(get_ttype_entry, get_adjusted_ptr, check_exception_spec): Add ARM
EABI implementations.
(PERSONALITY_FUNCTION): Use new functions. Addd support for ARM EABI
unwinding libary.
(__cxa_unexpected): Disable when using the ARM EABI.
* libsupc++/eh_throw.cc (__cxa_throw): Use __GXX_INIT_EXCEPTION_CLASS.
(__cxa_rethrow): Use __is_gxx_exception_class. Call
_Unwind_RaiseException when using the ARM EABI.
* libsupc++/unwind-cxx.h (struct __cxa_exception): Add fields for ARM
EABI semantics.
(struct __cxa_eh_globals): Ditto.
(__cxa_call_terminate): Add prototype.
(__cxa_type_match, __cxa_begin_cleanup, __cxa_end_cleanup): Add
prototypes.
(__get_exception_header_from_obj, __get_exception_header_from_ue):
Move earlier in file.
(__is_gxx_exception_class, __GXX_INIT_EXCEPTION_CLASS,
__gxx_caught_object): New functions.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* libmath/Makefile.in: Regenerate.
* libsupc++/Makefile.in: Regenerate.
* po/Makefile.in: Regenerate.
* src/Makefie.in: Regenerate.
* testsuite/makefile.in: Regenerate.
From-SVN: r101385
2005-06-28 21:52:27 +02:00
|
|
|
/* BPABI targets use EABI frame unwinding tables. */
|
|
|
|
#define TARGET_UNWIND_INFO 1
|
|
|
|
|
2004-08-19 09:07:09 +02:00
|
|
|
/* Section 4.1 of the AAPCS requires the use of VFP format. */
|
2005-10-08 20:17:20 +02:00
|
|
|
#undef FPUTYPE_DEFAULT
|
2004-08-19 09:07:09 +02:00
|
|
|
#define FPUTYPE_DEFAULT FPUTYPE_VFP
|
|
|
|
|
2005-10-08 20:17:20 +02:00
|
|
|
/* EABI targets should enable interworking by default. */
|
|
|
|
#undef TARGET_DEFAULT
|
|
|
|
#define TARGET_DEFAULT MASK_INTERWORK
|
|
|
|
|
2004-08-11 04:50:14 +02:00
|
|
|
/* The ARM BPABI functions return a boolean; they use no special
|
|
|
|
calling convention. */
|
|
|
|
#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) TARGET_BPABI
|
|
|
|
|
darwin.c, [...]: Fix comment typos.
* config/darwin.c, config/alpha/alpha.h, config/arm/arm.c,
config/arm/arm.h, config/arm/arm.md, config/arm/bpabi.h,
config/arm/predicates.md, config/frv/frv.c, config/frv/frv.md,
config/h8300/h8300.md, config/i386/gmm_malloc.h,
config/ia64/ia64.md, config/ip2k/libgcc.S,
config/mips/mips-ps-3d.md, config/mips/mips.c,
config/rs6000/rs6000.c, config/s390/s390.c,
config/sh/symbian.c: Fix comment typos.
From-SVN: r87295
2004-09-10 13:55:21 +02:00
|
|
|
/* The BPABI integer comparison routines return { -1, 0, 1 }. */
|
2004-08-11 04:50:14 +02:00
|
|
|
#define TARGET_LIB_INT_CMP_BIASED !TARGET_BPABI
|
|
|
|
|
2004-08-20 22:15:19 +02:00
|
|
|
/* Tell the assembler to build BPABI binaries. */
|
|
|
|
#undef SUBTARGET_EXTRA_ASM_SPEC
|
2004-10-12 16:10:39 +02:00
|
|
|
#define SUBTARGET_EXTRA_ASM_SPEC "-meabi=4"
|
2004-08-20 22:15:19 +02:00
|
|
|
|
2004-08-11 04:50:14 +02:00
|
|
|
/* The generic link spec in elf.h does not support shared libraries. */
|
|
|
|
#undef LINK_SPEC
|
|
|
|
#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} " \
|
|
|
|
"%{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} " \
|
|
|
|
"-X"
|
|
|
|
|
2005-04-30 21:40:53 +02:00
|
|
|
#if defined (__thumb__)
|
2004-08-11 04:50:14 +02:00
|
|
|
#define RENAME_LIBRARY_SET ".thumb_set"
|
|
|
|
#else
|
|
|
|
#define RENAME_LIBRARY_SET ".set"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Make __aeabi_AEABI_NAME an alias for __GCC_NAME. */
|
|
|
|
#define RENAME_LIBRARY(GCC_NAME, AEABI_NAME) \
|
|
|
|
__asm__ (".globl\t__aeabi_" #AEABI_NAME "\n" \
|
|
|
|
RENAME_LIBRARY_SET "\t__aeabi_" #AEABI_NAME \
|
|
|
|
", __" #GCC_NAME "\n");
|
|
|
|
|
|
|
|
/* Give some libgcc functions an additional __aeabi name. */
|
|
|
|
#ifdef L_muldi3
|
|
|
|
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, lmul)
|
|
|
|
#endif
|
|
|
|
#ifdef L_muldi3
|
|
|
|
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, lmul)
|
|
|
|
#endif
|
|
|
|
#ifdef L_fixdfdi
|
|
|
|
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixdfdi, d2lz)
|
|
|
|
#endif
|
|
|
|
#ifdef L_fixunsdfdi
|
|
|
|
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfdi, d2ulz)
|
|
|
|
#endif
|
|
|
|
#ifdef L_fixsfdi
|
|
|
|
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixsfdi, f2lz)
|
|
|
|
#endif
|
|
|
|
#ifdef L_fixunssfdi
|
|
|
|
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfdi, f2ulz)
|
|
|
|
#endif
|
|
|
|
#ifdef L_floatdidf
|
|
|
|
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdidf, l2d)
|
|
|
|
#endif
|
|
|
|
#ifdef L_floatdisf
|
|
|
|
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdisf, l2f)
|
|
|
|
#endif
|
|
|
|
|
2004-09-03 02:43:59 +02:00
|
|
|
/* The BPABI requires that we always use an out-of-line implementation
|
|
|
|
of RTTI comparison, even if the target supports weak symbols,
|
|
|
|
because the same object file might be used on a target that does
|
|
|
|
not support merging symbols across DLL boundaries. This macro is
|
|
|
|
broken out separately so that it can be used within
|
|
|
|
TARGET_OS_CPP_BUILTINS in configuration files for systems based on
|
|
|
|
the BPABI. */
|
|
|
|
#define TARGET_BPABI_CPP_BUILTINS() \
|
|
|
|
do \
|
|
|
|
{ \
|
|
|
|
builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0"); \
|
|
|
|
} \
|
|
|
|
while (false)
|
|
|
|
|
2005-10-08 20:17:20 +02:00
|
|
|
#undef TARGET_OS_CPP_BUILTINS
|
2004-09-03 02:43:59 +02:00
|
|
|
#define TARGET_OS_CPP_BUILTINS() \
|
|
|
|
TARGET_BPABI_CPP_BUILTINS()
|
2005-04-29 16:09:45 +02:00
|
|
|
|
|
|
|
/* The BPABI specifies the use of .{init,fini}_array. Therefore, we
|
|
|
|
do not want GCC to put anything into the .{init,fini} sections. */
|
|
|
|
#undef INIT_SECTION_ASM_OP
|
|
|
|
#undef FINI_SECTION_ASM_OP
|
|
|
|
#define INIT_ARRAY_SECTION_ASM_OP ARM_EABI_CTORS_SECTION_OP
|
|
|
|
#define FINI_ARRAY_SECTION_ASM_OP ARM_EABI_DTORS_SECTION_OP
|