2001-04-12 04:13:00 +02:00
|
|
|
/* Target definitions for Darwin (Mac OS X) systems.
|
darwin.c, [...]: Update copyright.
* config/darwin.c, config/darwin.h, config/freebsd-spec.h,
config/alpha/alpha.c, config/arm/vfp.md,
config/i386/emmintrin.h, config/i386/i386-modes.def,
config/i386/i386-protos.h, config/i386/i386.h,
config/i386/pmmintrin.h, config/i386/ppro.md,
config/i386/predicates.md, config/i386/xmmintrin.h,
config/i860/i860.c, config/ia64/ia64-modes.def,
config/ia64/ia64-protos.h, config/ia64/ia64.h,
config/ia64/ia64.md, config/ia64/itanium1.md,
config/ia64/itanium2.md, config/ia64/predicates.md,
config/iq2000/iq2000.h, config/mips/linux64.h,
config/rs6000/aix41.h, config/rs6000/aix43.h,
config/rs6000/aix52.h, config/rs6000/darwin-fallback.c,
config/rs6000/rs6000.c, config/rs6000/rs6000.h,
config/rs6000/spe.md, config/sh/sh.md, config/sparc/linux.h,
config/sparc/linux64.h, config/sparc/litecoff.h,
config/sparc/sp64-elf.h, config/sparc/sparc.c,
config/sparc/sparc.h, config/sparc/sparc.md,
config/sparc/sysv4-only.h: Update copyright.
From-SVN: r93829
2005-01-18 13:01:51 +01:00
|
|
|
Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001, 2002, 2003, 2004,
|
|
|
|
2005
|
2001-04-12 04:13:00 +02:00
|
|
|
Free Software Foundation, Inc.
|
|
|
|
Contributed by Apple Computer Inc.
|
|
|
|
|
2003-09-27 06:48:30 +02:00
|
|
|
This file is part of GCC.
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2003-09-27 06:48:30 +02:00
|
|
|
GCC is free software; you can redistribute it and/or modify
|
2001-04-12 04:13:00 +02:00
|
|
|
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.
|
|
|
|
|
2003-09-27 06:48:30 +02:00
|
|
|
GCC is distributed in the hope that it will be useful,
|
2001-04-12 04:13:00 +02:00
|
|
|
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
|
2003-09-27 06:48:30 +02:00
|
|
|
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. */
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2004-02-13 02:58:37 +01:00
|
|
|
#ifndef CONFIG_DARWIN_H
|
|
|
|
#define CONFIG_DARWIN_H
|
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
/* The definitions in this file are common to all processor types
|
|
|
|
running Darwin, which is the kernel for Mac OS X. Darwin is
|
|
|
|
basically a BSD user layer laid over a Mach kernel, then evolved
|
|
|
|
for many years (at NeXT) in parallel with other Unix systems. So
|
|
|
|
while the runtime is a somewhat idiosyncratic Mach-based thing,
|
|
|
|
other definitions look like they would for a BSD variant. */
|
|
|
|
|
|
|
|
/* Although NeXT ran on many different architectures, as of Jan 2001
|
|
|
|
the only supported Darwin targets are PowerPC and x86. */
|
|
|
|
|
2002-09-13 05:44:54 +02:00
|
|
|
/* One of Darwin's NeXT legacies is the Mach-O format, which is partly
|
|
|
|
like a.out and partly like COFF, with additional features like
|
|
|
|
multi-architecture binary support. */
|
|
|
|
|
|
|
|
#define OBJECT_FORMAT_MACHO
|
|
|
|
|
2004-06-24 19:53:07 +02:00
|
|
|
/* Suppress g++ attempt to link in the math library automatically. */
|
2001-10-17 01:22:27 +02:00
|
|
|
#define MATH_LIBRARY ""
|
2001-04-12 04:13:00 +02:00
|
|
|
|
|
|
|
/* We have atexit. */
|
|
|
|
|
|
|
|
#define HAVE_ATEXIT
|
|
|
|
|
|
|
|
/* Define an empty body for the function do_global_dtors() in libgcc2.c. */
|
|
|
|
|
|
|
|
#define DO_GLOBAL_DTORS_BODY
|
|
|
|
|
|
|
|
/* The string value for __SIZE_TYPE__. */
|
|
|
|
|
|
|
|
#ifndef SIZE_TYPE
|
|
|
|
#define SIZE_TYPE "long unsigned int"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Type used for ptrdiff_t, as a string used in a declaration. */
|
|
|
|
|
|
|
|
#undef PTRDIFF_TYPE
|
|
|
|
#define PTRDIFF_TYPE "int"
|
|
|
|
|
|
|
|
/* wchar_t is int. */
|
|
|
|
|
|
|
|
#undef WCHAR_TYPE
|
|
|
|
#define WCHAR_TYPE "int"
|
|
|
|
#undef WCHAR_TYPE_SIZE
|
|
|
|
#define WCHAR_TYPE_SIZE 32
|
|
|
|
|
2001-04-29 00:18:06 +02:00
|
|
|
/* Default to using the NeXT-style runtime, since that's what is
|
|
|
|
pre-installed on Darwin systems. */
|
|
|
|
|
|
|
|
#define NEXT_OBJC_RUNTIME
|
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
/* Don't default to pcc-struct-return, because gcc is the only compiler, and
|
|
|
|
we want to retain compatibility with older gcc versions. */
|
|
|
|
|
|
|
|
#undef DEFAULT_PCC_STRUCT_RETURN
|
|
|
|
#define DEFAULT_PCC_STRUCT_RETURN 0
|
|
|
|
|
2002-12-10 21:20:47 +01:00
|
|
|
/* This table intercepts weirdo options whose names would interfere
|
|
|
|
with normal driver conventions, and either translates them into
|
|
|
|
standardly-named options, or adds a 'Z' so that they can get to
|
|
|
|
specs processing without interference.
|
|
|
|
|
|
|
|
Do not expand a linker option to "-Xlinker -<option>", since that
|
|
|
|
forfeits the ability to control via spec strings later. However,
|
|
|
|
as a special exception, do this translation with -filelist, because
|
|
|
|
otherwise the driver will think there are no input files and quit.
|
|
|
|
(The alternative would be to hack the driver to recognize -filelist
|
|
|
|
specially, but it's simpler to use the translation table.)
|
|
|
|
|
|
|
|
Note that an option name with a prefix that matches another option
|
|
|
|
name, that also takes an argument, needs to be modified so the
|
|
|
|
prefix is different, otherwise a '*' after the shorter option will
|
darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Refer to SUBTARGET_OPTION_TRANSLATE_TABLE for architecture-specific options.
[gcc/ChangeLog]
2004-02-21 Ziemowit Laski <zlaski@apple.com>
* config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Refer to
SUBTARGET_OPTION_TRANSLATE_TABLE for architecture-specific options.
* config/i386/darwin.h (SUBTARGET_OPTION_TRANSLATE_TABLE): Define it.
* config/rs6000/altivec.h: #error out if '-maltivec' not specified.
(vector, pixel, bool): #define to __vector, __pixel and __bool.
(__un_args_eq, __bin_args_eq, __tern_args_eq): Move to C-specific
portion of header.
(__altivec_link_error_invalid_argument): Remove prototype; will use
__builtin_altivec_compiletime_error("vec_*") instead.
(vec_*): Fix/complete set of available operation overloads given the
existence of distinct 'vector bool ...' and 'vector pixel' types; tighten
cv-correctness of pointer arguments; in C, always check for correct
argument types before macro expansion.
* config/rs6000/darwin.h (SUBTARGET_OPTION_TRANSLATE_TABLE): New macro
defining Darwin/PowerPC-specific '-f[no-]altivec' and
'-W[no-]altivec-long-deprecated' switches.
* config/rs6000/rs6000-c (rs6000_cpu_cpp_builtins): Pre-define
'__vector', '__pixel' and '__bool' macros using
'__attribute__((altivec(...)))' types.
* config/rs6000/rs6000.c (bool_char_type_node, bool_short_type_node,
bool_int_type_node, pixel_type_node, bool_V16QI_type_node,
bool_V8HI_type_node, bool_V4SI_type_node, pixel_V8HI_type_node):
New type nodes.
(rs6000_warn_altivec_long, rs6000_warn_altivec_long_switch): New, for
handling '-W[no-]altivec-long-deprecated'.
(rs6000_override_options): Handle '-W[no-]altivec-long-deprecated'.
(rs6000_expand_binop_builtin, rs6000_expand_ternop_builtin,
altivec_expand_dst_builtin): Remove casts from integer literals.
(altivec_expand_builtin): Likewise; handle expansion of new
'__builtin_altivec_compiletime_error' function.
(rs6000_init_builtins): Initialize 'vector bool ...' and 'vector pixel'
types, and make them distinct from other vector types; register
'__builtin_altivec_compiletime_error' function.
(print_operand): For 'P', print a full target register name instead of
merely its number.
(rs6000_attribute_table): Add "altivec" attribute.
(rs6000_handle_altivec_attribute): New function.
* config/rs6000/rs6000.h (TARGET_OPTIONS): Describe
'-m[no-]-warn-altivec-long' (which '-W[no-]altivec-long-deprecated'
maps to).
(rs6000_warn_altivec_long, rs6000_warn_altivec_long_switch): Forward
declare.
(ALTIVEC_BUILTIN_COMPILETIME_ERROR): New built-in enumeration.
[gcc/testsuite/ChangeLog]
2004-02-21 Ziemowit Laski <zlaski@apple.com>
* g++.dg/ext/altivec-1.C: Generalize target triple.
* g++.dg/ext/altivec-2.C: New test case.
* g++.dg/ext/altivec_check.h: New file.
* gcc.dg/altivec-1.c: Generalize target triple;
include altivec_check.h and call altivec_check().
* gcc.dg/altivec-[2-5].c: Generalize target triple.
* gcc.dg/altivec-6.c: New test case.
* gcc.dg/altivec-[7-9].c: Generalize target triple; add
type casts as needed.
* gcc.dg/altivec-10.c: Include altivec_check.h and call
altivec_check().
* gcc.dg/altivec-12.c: New test case.
* gcc.dg/altivec-varargs-1.c: Generalize target triple;
include altivec_check.h and call altivec_check().
* gcc.dg/altivec_check.h: New file.
From-SVN: r78215
2004-02-21 10:08:37 +01:00
|
|
|
match with the longer one.
|
2005-08-04 01:35:06 +02:00
|
|
|
|
darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Refer to SUBTARGET_OPTION_TRANSLATE_TABLE for architecture-specific options.
[gcc/ChangeLog]
2004-02-21 Ziemowit Laski <zlaski@apple.com>
* config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Refer to
SUBTARGET_OPTION_TRANSLATE_TABLE for architecture-specific options.
* config/i386/darwin.h (SUBTARGET_OPTION_TRANSLATE_TABLE): Define it.
* config/rs6000/altivec.h: #error out if '-maltivec' not specified.
(vector, pixel, bool): #define to __vector, __pixel and __bool.
(__un_args_eq, __bin_args_eq, __tern_args_eq): Move to C-specific
portion of header.
(__altivec_link_error_invalid_argument): Remove prototype; will use
__builtin_altivec_compiletime_error("vec_*") instead.
(vec_*): Fix/complete set of available operation overloads given the
existence of distinct 'vector bool ...' and 'vector pixel' types; tighten
cv-correctness of pointer arguments; in C, always check for correct
argument types before macro expansion.
* config/rs6000/darwin.h (SUBTARGET_OPTION_TRANSLATE_TABLE): New macro
defining Darwin/PowerPC-specific '-f[no-]altivec' and
'-W[no-]altivec-long-deprecated' switches.
* config/rs6000/rs6000-c (rs6000_cpu_cpp_builtins): Pre-define
'__vector', '__pixel' and '__bool' macros using
'__attribute__((altivec(...)))' types.
* config/rs6000/rs6000.c (bool_char_type_node, bool_short_type_node,
bool_int_type_node, pixel_type_node, bool_V16QI_type_node,
bool_V8HI_type_node, bool_V4SI_type_node, pixel_V8HI_type_node):
New type nodes.
(rs6000_warn_altivec_long, rs6000_warn_altivec_long_switch): New, for
handling '-W[no-]altivec-long-deprecated'.
(rs6000_override_options): Handle '-W[no-]altivec-long-deprecated'.
(rs6000_expand_binop_builtin, rs6000_expand_ternop_builtin,
altivec_expand_dst_builtin): Remove casts from integer literals.
(altivec_expand_builtin): Likewise; handle expansion of new
'__builtin_altivec_compiletime_error' function.
(rs6000_init_builtins): Initialize 'vector bool ...' and 'vector pixel'
types, and make them distinct from other vector types; register
'__builtin_altivec_compiletime_error' function.
(print_operand): For 'P', print a full target register name instead of
merely its number.
(rs6000_attribute_table): Add "altivec" attribute.
(rs6000_handle_altivec_attribute): New function.
* config/rs6000/rs6000.h (TARGET_OPTIONS): Describe
'-m[no-]-warn-altivec-long' (which '-W[no-]altivec-long-deprecated'
maps to).
(rs6000_warn_altivec_long, rs6000_warn_altivec_long_switch): Forward
declare.
(ALTIVEC_BUILTIN_COMPILETIME_ERROR): New built-in enumeration.
[gcc/testsuite/ChangeLog]
2004-02-21 Ziemowit Laski <zlaski@apple.com>
* g++.dg/ext/altivec-1.C: Generalize target triple.
* g++.dg/ext/altivec-2.C: New test case.
* g++.dg/ext/altivec_check.h: New file.
* gcc.dg/altivec-1.c: Generalize target triple;
include altivec_check.h and call altivec_check().
* gcc.dg/altivec-[2-5].c: Generalize target triple.
* gcc.dg/altivec-6.c: New test case.
* gcc.dg/altivec-[7-9].c: Generalize target triple; add
type casts as needed.
* gcc.dg/altivec-10.c: Include altivec_check.h and call
altivec_check().
* gcc.dg/altivec-12.c: New test case.
* gcc.dg/altivec-varargs-1.c: Generalize target triple;
include altivec_check.h and call altivec_check().
* gcc.dg/altivec_check.h: New file.
From-SVN: r78215
2004-02-21 10:08:37 +01:00
|
|
|
The SUBTARGET_OPTION_TRANSLATE_TABLE macro, which _must_ be defined
|
|
|
|
in gcc/config/{i386,rs6000}/darwin.h, should contain any additional
|
|
|
|
command-line option translations specific to the particular target
|
|
|
|
architecture. */
|
2005-08-04 01:35:06 +02:00
|
|
|
|
2002-12-10 21:20:47 +01:00
|
|
|
#define TARGET_OPTION_TRANSLATE_TABLE \
|
|
|
|
{ "-all_load", "-Zall_load" }, \
|
|
|
|
{ "-allowable_client", "-Zallowable_client" }, \
|
|
|
|
{ "-arch_errors_fatal", "-Zarch_errors_fatal" }, \
|
|
|
|
{ "-bind_at_load", "-Zbind_at_load" }, \
|
|
|
|
{ "-bundle", "-Zbundle" }, \
|
|
|
|
{ "-bundle_loader", "-Zbundle_loader" }, \
|
|
|
|
{ "-weak_reference_mismatches", "-Zweak_reference_mismatches" }, \
|
2004-08-11 23:26:12 +02:00
|
|
|
{ "-dead_strip", "-Zdead_strip" }, \
|
|
|
|
{ "-no_dead_strip_inits_and_terms", "-Zno_dead_strip_inits_and_terms" }, \
|
2002-12-10 21:20:47 +01:00
|
|
|
{ "-dependency-file", "-MF" }, \
|
|
|
|
{ "-dylib_file", "-Zdylib_file" }, \
|
2002-12-20 00:46:49 +01:00
|
|
|
{ "-dynamic", "-Zdynamic" }, \
|
2002-12-10 21:20:47 +01:00
|
|
|
{ "-dynamiclib", "-Zdynamiclib" }, \
|
|
|
|
{ "-exported_symbols_list", "-Zexported_symbols_list" }, \
|
2004-12-02 19:42:26 +01:00
|
|
|
{ "-gfull", "-g -fno-eliminate-unused-debug-symbols" }, \
|
|
|
|
{ "-gused", "-g -feliminate-unused-debug-symbols" }, \
|
2004-09-08 20:56:22 +02:00
|
|
|
{ "-segaddr", "-Zsegaddr" }, \
|
|
|
|
{ "-segs_read_only_addr", "-Zsegs_read_only_addr" }, \
|
|
|
|
{ "-segs_read_write_addr", "-Zsegs_read_write_addr" }, \
|
|
|
|
{ "-seg_addr_table", "-Zseg_addr_table" }, \
|
2002-12-10 21:20:47 +01:00
|
|
|
{ "-seg_addr_table_filename", "-Zseg_addr_table_filename" }, \
|
|
|
|
{ "-filelist", "-Xlinker -filelist -Xlinker" }, \
|
Add framework support for darwin.
* c-incpath.c: Include target.h and machmode.h.
(add_path): Use a consistent style for cpp_dir. Initialize
p->construct to 0.
(add_cpp_dir_path): New.
(register_include_chains): Add use of extra_includes callback.
(hook_void_int): Add.
(target_c_incpath): Add.
* c-incpath.h (add_cpp_dir_path): New.
(target_c_incpath_s): Add.
(target_c_incpath): Add.
(C_INCPATH_INIT): Add.
* c-opts.c (c_common_missing_argument,
c_common_handle_option): Add -F argument processing.
* c.opt: Add -F argument processing.
* gcc.c (trad_capable_cpp): Add -F argument processing.
* cppfiles.c (find_file_in_dir): Update to use construct
callback.
(search_path_exhausted, cpp_get_path, cpp_get_buffer,
cpp_get_prev): New.
(_cpp_find_file): Use search_path_exhausted.
(make_cpp_dir): Initialize construct to 0.
* cpplib.h (missing_header_cb
cpp_get_path, cpp_get_buffer, cpp_get_file, cpp_get_prev): New.
(cpp_callbacks): Add missing_header
(cpp_dir): Add construct.
* target-def.h: (TARGET_OPTF): New.
* hooks.c (hook_void_int, hook_void_charptr): Add.
* hooks.h (hook_void_int, hook_void_charptr): Add.
* Makefile.in (c-incpath.o) : Add $(TARGET_H) and
$(MACHMODE_H) dependencies.
* doc/invoke.texi (Darwin Options): Document -F.
* doc/tm.texi (TARGET_EXTRA_INCLUDES): Add.
(TARGET_OPTF): Add.
* fix-header.c (target_c_incpath): Add.
* config/darwin-c.c: Add c-incpath.h include.
(using_frameworks, find_subframework_file,
find_subframework_header, add_system_framework_path,
frameworks_in_use, num_frameworks, max_frameworks,
add_framework, find_framework, struct framework_header,
framework_header_dirs, framework_construct_pathname,
find_subframework_file, add_system_framework_path,
add_framework_path, framework_defaults,
darwin_register_frameworks, find_subframework_header): Add.
* config/darwin.h (TARGET_EXTRA_INCLUDES, TARGET_OPTF): New.
(TARGET_OPTION_TRANSLATE_TABLE): Add -framework support.
(CPP_SPEC): Add __APPLE_CC__ support.
* t-darwin (darwin-c.o): Add c-incpath.h dependency.
From-SVN: r78875
2004-03-04 01:18:54 +01:00
|
|
|
{ "-framework", "-Xlinker -framework -Xlinker" }, \
|
2002-12-10 21:20:47 +01:00
|
|
|
{ "-flat_namespace", "-Zflat_namespace" }, \
|
|
|
|
{ "-force_cpusubtype_ALL", "-Zforce_cpusubtype_ALL" }, \
|
|
|
|
{ "-force_flat_namespace", "-Zforce_flat_namespace" }, \
|
|
|
|
{ "-image_base", "-Zimage_base" }, \
|
|
|
|
{ "-init", "-Zinit" }, \
|
|
|
|
{ "-install_name", "-Zinstall_name" }, \
|
|
|
|
{ "-multiply_defined_unused", "-Zmultiplydefinedunused" }, \
|
|
|
|
{ "-multiply_defined", "-Zmultiply_defined" }, \
|
|
|
|
{ "-multi_module", "-Zmulti_module" }, \
|
|
|
|
{ "-static", "-static -Wa,-static" }, \
|
|
|
|
{ "-single_module", "-Zsingle_module" }, \
|
darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Refer to SUBTARGET_OPTION_TRANSLATE_TABLE for architecture-specific options.
[gcc/ChangeLog]
2004-02-21 Ziemowit Laski <zlaski@apple.com>
* config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Refer to
SUBTARGET_OPTION_TRANSLATE_TABLE for architecture-specific options.
* config/i386/darwin.h (SUBTARGET_OPTION_TRANSLATE_TABLE): Define it.
* config/rs6000/altivec.h: #error out if '-maltivec' not specified.
(vector, pixel, bool): #define to __vector, __pixel and __bool.
(__un_args_eq, __bin_args_eq, __tern_args_eq): Move to C-specific
portion of header.
(__altivec_link_error_invalid_argument): Remove prototype; will use
__builtin_altivec_compiletime_error("vec_*") instead.
(vec_*): Fix/complete set of available operation overloads given the
existence of distinct 'vector bool ...' and 'vector pixel' types; tighten
cv-correctness of pointer arguments; in C, always check for correct
argument types before macro expansion.
* config/rs6000/darwin.h (SUBTARGET_OPTION_TRANSLATE_TABLE): New macro
defining Darwin/PowerPC-specific '-f[no-]altivec' and
'-W[no-]altivec-long-deprecated' switches.
* config/rs6000/rs6000-c (rs6000_cpu_cpp_builtins): Pre-define
'__vector', '__pixel' and '__bool' macros using
'__attribute__((altivec(...)))' types.
* config/rs6000/rs6000.c (bool_char_type_node, bool_short_type_node,
bool_int_type_node, pixel_type_node, bool_V16QI_type_node,
bool_V8HI_type_node, bool_V4SI_type_node, pixel_V8HI_type_node):
New type nodes.
(rs6000_warn_altivec_long, rs6000_warn_altivec_long_switch): New, for
handling '-W[no-]altivec-long-deprecated'.
(rs6000_override_options): Handle '-W[no-]altivec-long-deprecated'.
(rs6000_expand_binop_builtin, rs6000_expand_ternop_builtin,
altivec_expand_dst_builtin): Remove casts from integer literals.
(altivec_expand_builtin): Likewise; handle expansion of new
'__builtin_altivec_compiletime_error' function.
(rs6000_init_builtins): Initialize 'vector bool ...' and 'vector pixel'
types, and make them distinct from other vector types; register
'__builtin_altivec_compiletime_error' function.
(print_operand): For 'P', print a full target register name instead of
merely its number.
(rs6000_attribute_table): Add "altivec" attribute.
(rs6000_handle_altivec_attribute): New function.
* config/rs6000/rs6000.h (TARGET_OPTIONS): Describe
'-m[no-]-warn-altivec-long' (which '-W[no-]altivec-long-deprecated'
maps to).
(rs6000_warn_altivec_long, rs6000_warn_altivec_long_switch): Forward
declare.
(ALTIVEC_BUILTIN_COMPILETIME_ERROR): New built-in enumeration.
[gcc/testsuite/ChangeLog]
2004-02-21 Ziemowit Laski <zlaski@apple.com>
* g++.dg/ext/altivec-1.C: Generalize target triple.
* g++.dg/ext/altivec-2.C: New test case.
* g++.dg/ext/altivec_check.h: New file.
* gcc.dg/altivec-1.c: Generalize target triple;
include altivec_check.h and call altivec_check().
* gcc.dg/altivec-[2-5].c: Generalize target triple.
* gcc.dg/altivec-6.c: New test case.
* gcc.dg/altivec-[7-9].c: Generalize target triple; add
type casts as needed.
* gcc.dg/altivec-10.c: Include altivec_check.h and call
altivec_check().
* gcc.dg/altivec-12.c: New test case.
* gcc.dg/altivec-varargs-1.c: Generalize target triple;
include altivec_check.h and call altivec_check().
* gcc.dg/altivec_check.h: New file.
From-SVN: r78215
2004-02-21 10:08:37 +01:00
|
|
|
{ "-unexported_symbols_list", "-Zunexported_symbols_list" }, \
|
|
|
|
SUBTARGET_OPTION_TRANSLATE_TABLE
|
2004-07-29 01:57:28 +02:00
|
|
|
|
2005-08-24 20:22:12 +02:00
|
|
|
#define SUBTARGET_OS_CPP_BUILTINS() \
|
|
|
|
do \
|
|
|
|
{ \
|
|
|
|
if (flag_pic) \
|
|
|
|
builtin_define ("__PIC__"); \
|
|
|
|
} \
|
|
|
|
while (0)
|
|
|
|
|
2002-12-10 21:20:47 +01:00
|
|
|
/* These compiler options take n arguments. */
|
|
|
|
|
|
|
|
#undef WORD_SWITCH_TAKES_ARG
|
|
|
|
#define WORD_SWITCH_TAKES_ARG(STR) \
|
|
|
|
(DEFAULT_WORD_SWITCH_TAKES_ARG (STR) ? 1 : \
|
|
|
|
!strcmp (STR, "Zallowable_client") ? 1 : \
|
|
|
|
!strcmp (STR, "arch") ? 1 : \
|
|
|
|
!strcmp (STR, "arch_only") ? 1 : \
|
|
|
|
!strcmp (STR, "Zbundle_loader") ? 1 : \
|
|
|
|
!strcmp (STR, "client_name") ? 1 : \
|
|
|
|
!strcmp (STR, "compatibility_version") ? 1 : \
|
|
|
|
!strcmp (STR, "current_version") ? 1 : \
|
|
|
|
!strcmp (STR, "Zdylib_file") ? 1 : \
|
|
|
|
!strcmp (STR, "Zexported_symbols_list") ? 1 : \
|
|
|
|
!strcmp (STR, "Zimage_base") ? 1 : \
|
|
|
|
!strcmp (STR, "Zinit") ? 1 : \
|
|
|
|
!strcmp (STR, "Zinstall_name") ? 1 : \
|
|
|
|
!strcmp (STR, "Zmultiplydefinedunused") ? 1 : \
|
|
|
|
!strcmp (STR, "Zmultiply_defined") ? 1 : \
|
|
|
|
!strcmp (STR, "precomp-trustfile") ? 1 : \
|
|
|
|
!strcmp (STR, "read_only_relocs") ? 1 : \
|
|
|
|
!strcmp (STR, "sectcreate") ? 3 : \
|
|
|
|
!strcmp (STR, "sectorder") ? 3 : \
|
2004-09-08 20:56:22 +02:00
|
|
|
!strcmp (STR, "Zsegaddr") ? 2 : \
|
|
|
|
!strcmp (STR, "Zsegs_read_only_addr") ? 1 : \
|
|
|
|
!strcmp (STR, "Zsegs_read_write_addr") ? 1 : \
|
|
|
|
!strcmp (STR, "Zseg_addr_table") ? 1 : \
|
2002-12-10 21:20:47 +01:00
|
|
|
!strcmp (STR, "Zseg_addr_table_filename") ?1 :\
|
|
|
|
!strcmp (STR, "seg1addr") ? 1 : \
|
|
|
|
!strcmp (STR, "segprot") ? 3 : \
|
|
|
|
!strcmp (STR, "sub_library") ? 1 : \
|
|
|
|
!strcmp (STR, "sub_umbrella") ? 1 : \
|
|
|
|
!strcmp (STR, "umbrella") ? 1 : \
|
|
|
|
!strcmp (STR, "undefined") ? 1 : \
|
|
|
|
!strcmp (STR, "Zunexported_symbols_list") ? 1 : \
|
|
|
|
!strcmp (STR, "Zweak_reference_mismatches") ? 1 : \
|
|
|
|
!strcmp (STR, "pagezero_size") ? 1 : \
|
|
|
|
!strcmp (STR, "segs_read_only_addr") ? 1 : \
|
|
|
|
!strcmp (STR, "segs_read_write_addr") ? 1 : \
|
|
|
|
!strcmp (STR, "sectalign") ? 3 : \
|
|
|
|
!strcmp (STR, "sectobjectsymbols") ? 2 : \
|
|
|
|
!strcmp (STR, "segcreate") ? 3 : \
|
|
|
|
!strcmp (STR, "dylinker_install_name") ? 1 : \
|
|
|
|
0)
|
|
|
|
|
2005-07-08 07:51:06 +02:00
|
|
|
/* Machine dependent cpp options. Don't add more options here, add
|
|
|
|
them to darwin_cpp_builtins in darwin-c.c. */
|
2001-04-12 04:13:00 +02:00
|
|
|
|
|
|
|
#undef CPP_SPEC
|
2005-07-08 07:51:06 +02:00
|
|
|
#define CPP_SPEC "%{static:%{!dynamic:-D__STATIC__}}%{!static:-D__DYNAMIC__}"
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2002-12-10 21:20:47 +01:00
|
|
|
/* This is mostly a clone of the standard LINK_COMMAND_SPEC, plus
|
|
|
|
precomp, libtool, and fat build additions. Also we
|
|
|
|
don't specify a second %G after %L because libSystem is
|
|
|
|
self-contained and doesn't need to link against libgcc.a. */
|
|
|
|
/* In general, random Darwin linker flags should go into LINK_SPEC
|
|
|
|
instead of LINK_COMMAND_SPEC. The command spec is better for
|
|
|
|
specifying the handling of options understood by generic Unix
|
|
|
|
linkers, and for positional arguments like libraries. */
|
|
|
|
#define LINK_COMMAND_SPEC "\
|
|
|
|
%{!fdump=*:%{!fsyntax-only:%{!precomp:%{!c:%{!M:%{!MM:%{!E:%{!S:\
|
|
|
|
%{!Zdynamiclib:%(linker)}%{Zdynamiclib:/usr/bin/libtool} \
|
|
|
|
%l %X %{d} %{s} %{t} %{Z} \
|
|
|
|
%{!Zdynamiclib:%{A} %{e*} %{m} %{N} %{n} %{r} %{u*} %{x} %{z}} \
|
|
|
|
%{@:-o %f%u.out}%{!@:%{o*}%{!o:-o a.out}} \
|
|
|
|
%{!Zdynamiclib:%{!A:%{!nostdlib:%{!nostartfiles:%S}}}} \
|
2005-03-04 05:43:03 +01:00
|
|
|
%{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate|coverage:-lgcov} \
|
2005-08-04 01:35:06 +02:00
|
|
|
%{!nostdlib:%{!nodefaultlibs:%(link_ssp) %G %L}} \
|
2004-07-11 02:23:39 +02:00
|
|
|
%{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}}"
|
2002-12-10 21:20:47 +01:00
|
|
|
|
|
|
|
/* Please keep the random linker options in alphabetical order (modulo
|
|
|
|
'Z' and 'no' prefixes). Options that can only go to one of libtool
|
|
|
|
or ld must be listed twice, under both !Zdynamiclib and
|
|
|
|
Zdynamiclib, with one of the cases reporting an error. */
|
|
|
|
/* Note that options taking arguments may appear multiple times on a
|
|
|
|
command line with different arguments each time, so put a * after
|
|
|
|
their names so all of them get passed. */
|
|
|
|
#define LINK_SPEC \
|
|
|
|
"%{static}%{!static:-dynamic} \
|
2004-09-16 08:49:59 +02:00
|
|
|
%{fgnu-runtime:%:replace-outfile(-lobjc -lobjc-gnu)}\
|
2002-12-10 21:20:47 +01:00
|
|
|
%{!Zdynamiclib: \
|
2004-10-30 04:48:49 +02:00
|
|
|
%{Zforce_cpusubtype_ALL:-arch %(darwin_arch) -force_cpusubtype_ALL} \
|
|
|
|
%{!Zforce_cpusubtype_ALL:-arch %(darwin_subarch)} \
|
2002-12-10 21:20:47 +01:00
|
|
|
%{Zbundle:-bundle} \
|
|
|
|
%{Zbundle_loader*:-bundle_loader %*} \
|
|
|
|
%{client_name*} \
|
|
|
|
%{compatibility_version*:%e-compatibility_version only allowed with -dynamiclib\
|
|
|
|
} \
|
|
|
|
%{current_version*:%e-current_version only allowed with -dynamiclib} \
|
|
|
|
%{Zforce_flat_namespace:-force_flat_namespace} \
|
|
|
|
%{Zinstall_name*:%e-install_name only allowed with -dynamiclib} \
|
|
|
|
%{keep_private_externs} \
|
|
|
|
%{private_bundle} \
|
|
|
|
} \
|
|
|
|
%{Zdynamiclib: \
|
|
|
|
%{Zbundle:%e-bundle not allowed with -dynamiclib} \
|
|
|
|
%{Zbundle_loader*:%e-bundle_loader not allowed with -dynamiclib} \
|
|
|
|
%{client_name*:%e-client_name not allowed with -dynamiclib} \
|
|
|
|
%{compatibility_version*} \
|
|
|
|
%{current_version*} \
|
2004-10-30 04:48:49 +02:00
|
|
|
%{Zforce_cpusubtype_ALL:-arch_only %(darwin_arch)} \
|
|
|
|
%{!Zforce_cpusubtype_ALL: -arch_only %(darwin_subarch)} \
|
2002-12-10 21:20:47 +01:00
|
|
|
%{Zforce_flat_namespace:%e-force_flat_namespace not allowed with -dynamiclib} \
|
|
|
|
%{Zinstall_name*:-install_name %*} \
|
|
|
|
%{keep_private_externs:%e-keep_private_externs not allowed with -dynamiclib} \
|
|
|
|
%{private_bundle:%e-private_bundle not allowed with -dynamiclib} \
|
|
|
|
} \
|
|
|
|
%{Zall_load:-all_load}%{Zdynamiclib:%{!Zall_load:-noall_load}} \
|
|
|
|
%{Zallowable_client*:-allowable_client %*} \
|
|
|
|
%{Zbind_at_load:-bind_at_load} \
|
|
|
|
%{Zarch_errors_fatal:-arch_errors_fatal} \
|
2004-08-11 23:26:12 +02:00
|
|
|
%{Zdead_strip:-dead_strip} \
|
|
|
|
%{Zno_dead_strip_inits_and_terms:-no_dead_strip_inits_and_terms} \
|
2002-12-10 21:20:47 +01:00
|
|
|
%{Zdylib_file*:-dylib_file %*} \
|
2002-12-20 00:46:49 +01:00
|
|
|
%{Zdynamic:-dynamic}\
|
2002-12-10 21:20:47 +01:00
|
|
|
%{Zexported_symbols_list*:-exported_symbols_list %*} \
|
|
|
|
%{Zflat_namespace:-flat_namespace} \
|
|
|
|
%{headerpad_max_install_names*} \
|
|
|
|
%{Zimage_base*:-image_base %*} \
|
|
|
|
%{Zinit*:-init %*} \
|
2005-08-31 23:43:06 +02:00
|
|
|
%{mmacosx-version-min=*:-macosx_version_min %*} \
|
2002-12-10 21:20:47 +01:00
|
|
|
%{nomultidefs} \
|
|
|
|
%{Zmulti_module:-multi_module} %{Zsingle_module:-single_module} \
|
|
|
|
%{Zmultiply_defined*:-multiply_defined %*} \
|
|
|
|
%{Zmultiplydefinedunused*:-multiply_defined_unused %*} \
|
2003-09-10 02:43:38 +02:00
|
|
|
%{prebind} %{noprebind} %{nofixprebinding} %{prebind_all_twolevel_modules} \
|
2002-12-10 21:20:47 +01:00
|
|
|
%{read_only_relocs} \
|
2004-09-08 20:56:22 +02:00
|
|
|
%{sectcreate*} %{sectorder*} %{seg1addr*} %{segprot*} \
|
|
|
|
%{Zsegaddr*:-segaddr %*} \
|
|
|
|
%{Zsegs_read_only_addr*:-segs_read_only_addr %*} \
|
|
|
|
%{Zsegs_read_write_addr*:-segs_read_write_addr %*} \
|
|
|
|
%{Zseg_addr_table*: -seg_addr_table %*} \
|
2002-12-10 21:20:47 +01:00
|
|
|
%{Zseg_addr_table_filename*:-seg_addr_table_filename %*} \
|
|
|
|
%{sub_library*} %{sub_umbrella*} \
|
2005-06-04 01:21:19 +02:00
|
|
|
%{isysroot*:-syslibroot %*} \
|
2002-12-10 21:20:47 +01:00
|
|
|
%{twolevel_namespace} %{twolevel_namespace_hints} \
|
|
|
|
%{umbrella*} \
|
|
|
|
%{undefined*} \
|
|
|
|
%{Zunexported_symbols_list*:-unexported_symbols_list %*} \
|
|
|
|
%{Zweak_reference_mismatches*:-weak_reference_mismatches %*} \
|
2004-10-26 08:09:05 +02:00
|
|
|
%{!Zweak_reference_mismatches*:-weak_reference_mismatches non-weak} \
|
2002-12-10 21:20:47 +01:00
|
|
|
%{X} \
|
|
|
|
%{y*} \
|
|
|
|
%{w} \
|
|
|
|
%{pagezero_size*} %{segs_read_*} %{seglinkedit} %{noseglinkedit} \
|
|
|
|
%{sectalign*} %{sectobjectsymbols*} %{segcreate*} %{whyload} \
|
|
|
|
%{whatsloaded} %{dylinker_install_name*} \
|
|
|
|
%{dylinker} %{Mach} "
|
|
|
|
|
|
|
|
|
2005-07-08 07:51:06 +02:00
|
|
|
/* Machine dependent libraries. */
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2001-05-15 04:17:14 +02:00
|
|
|
#define LIB_SPEC "%{!static:-lSystem}"
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2005-09-29 01:50:06 +02:00
|
|
|
/* -dynamiclib implies -shared-libgcc just like -shared would on linux.
|
|
|
|
Support -mmacosx-version-min by supplying different (stub) libgcc_s.dylib
|
|
|
|
libraries to link against. */
|
|
|
|
#undef REAL_LIBGCC_SPEC
|
|
|
|
#define REAL_LIBGCC_SPEC \
|
|
|
|
"%{static|static-libgcc:-lgcc -lgcc_eh; \
|
|
|
|
:%{shared-libgcc|Zdynamiclib \
|
|
|
|
:%:version-compare(!> 10.5 mmacosx-version-min= -lgcc_s.10.4) \
|
|
|
|
%:version-compare(>= 10.5 mmacosx-version-min= -lgcc_s.10.5) \
|
|
|
|
-lgcc; \
|
|
|
|
:-lgcc -lgcc_eh}}"
|
2004-11-04 03:30:26 +01:00
|
|
|
|
2002-09-29 15:16:44 +02:00
|
|
|
/* We specify crt0.o as -lcrt0.o so that ld will search the library path. */
|
2005-01-05 19:39:43 +01:00
|
|
|
/* We don't want anything to do with crt2.o in the 64-bit case;
|
|
|
|
testing the PowerPC-specific -m64 flag here is a little irregular,
|
|
|
|
but it's overkill to make copies of this spec for each target
|
|
|
|
arch. */
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2002-12-10 21:20:47 +01:00
|
|
|
#undef STARTFILE_SPEC
|
2001-04-12 04:13:00 +02:00
|
|
|
#define STARTFILE_SPEC \
|
2002-12-10 21:20:47 +01:00
|
|
|
"%{!Zdynamiclib:%{Zbundle:%{!static:-lbundle1.o}} \
|
|
|
|
%{!Zbundle:%{pg:%{static:-lgcrt0.o} \
|
|
|
|
%{!static:%{object:-lgcrt0.o} \
|
|
|
|
%{!object:%{preload:-lgcrt0.o} \
|
2005-01-05 19:39:43 +01:00
|
|
|
%{!preload:-lgcrt1.o %{!m64: crt2.o%s}}}}} \
|
2002-12-10 21:20:47 +01:00
|
|
|
%{!pg:%{static:-lcrt0.o} \
|
|
|
|
%{!static:%{object:-lcrt0.o} \
|
|
|
|
%{!object:%{preload:-lcrt0.o} \
|
2005-01-05 19:39:43 +01:00
|
|
|
%{!preload:-lcrt1.o %{!m64: crt2.o%s}}}}}}}"
|
2002-09-13 05:44:54 +02:00
|
|
|
|
2002-11-07 07:00:07 +01:00
|
|
|
/* The native Darwin linker doesn't necessarily place files in the order
|
|
|
|
that they're specified on the link line. Thus, it is pointless
|
|
|
|
to put anything in ENDFILE_SPEC. */
|
|
|
|
/* #define ENDFILE_SPEC "" */
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2004-10-15 00:30:47 +02:00
|
|
|
/* Default Darwin ASM_SPEC, very simple. */
|
2004-10-30 04:48:49 +02:00
|
|
|
#define ASM_SPEC "-arch %(darwin_arch) \
|
|
|
|
%{Zforce_cpusubtype_ALL:-force_cpusubtype_ALL}"
|
2004-10-15 00:30:47 +02:00
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
/* We use Dbx symbol format. */
|
|
|
|
|
2002-08-29 23:40:18 +02:00
|
|
|
#define DBX_DEBUGGING_INFO 1
|
2001-04-12 04:13:00 +02:00
|
|
|
|
tm.texi (TARGET_ASM_EMIT_UNWIND_LABEL): Add argument to indicate if this label is for eh.
* doc/tm.texi (TARGET_ASM_EMIT_UNWIND_LABEL): Add argument to indicate
if this label is for eh.
* config/darwin-protos.h (darwin_emit_unwind_label): Likewise.
* config/darwin.c (darwin_emit_unwind_label): Likewise.
* dwarf2out.c (output_call_frame_info): Likewise.
* output.h (default_emit_unwind_label): Likewise.
* target.h (unwind_label): Likewise.
* varasm.c (default_emit_unwind_label): Likewise.
* config/darwin.h (DWARF2_DEBUGGING_INFO, PREFERRED_DEBUGGING_TYPE,
DEBUG_FRAME_SECTION, DEBUG_INFO_SECTION, DEBUG_ABBREV_SECTION,
DEBUG_ARANGES_SECTION, DEBUG_MACINFO_SECTION, DEBUG_LINE_SECTION,
DEBUG_LOC_SECTION, DEBUG_PUBNAMES_SECTION, DEBUG_STR_SECTION,
DEBUG_RANGES_SECTION): Define.
Radar 3657068.
Co-Authored-By: Devang Patel <dpatel@apple.com>
From-SVN: r82016
2004-05-19 04:11:42 +02:00
|
|
|
/* Also enable Dwarf 2 as an option. */
|
|
|
|
#define DWARF2_DEBUGGING_INFO
|
|
|
|
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
|
|
|
|
|
|
|
|
#define DEBUG_FRAME_SECTION "__DWARFA,__debug_frame,coalesced,no_toc+strip_static_syms"
|
|
|
|
#define DEBUG_INFO_SECTION "__DWARFA,__debug_info"
|
|
|
|
#define DEBUG_ABBREV_SECTION "__DWARFA,__debug_abbrev"
|
|
|
|
#define DEBUG_ARANGES_SECTION "__DWARFA,__debug_aranges"
|
|
|
|
#define DEBUG_MACINFO_SECTION "__DWARFA,__debug_macinfo"
|
|
|
|
#define DEBUG_LINE_SECTION "__DWARFA,__debug_line"
|
|
|
|
#define DEBUG_LOC_SECTION "__DWARFA,__debug_loc"
|
|
|
|
#define DEBUG_PUBNAMES_SECTION "__DWARFA,__debug_pubnames"
|
|
|
|
#define DEBUG_STR_SECTION "__DWARFA,__debug_str"
|
|
|
|
#define DEBUG_RANGES_SECTION "__DWARFA,__debug_ranges"
|
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
/* When generating stabs debugging, use N_BINCL entries. */
|
|
|
|
|
|
|
|
#define DBX_USE_BINCL
|
|
|
|
|
|
|
|
/* There is no limit to the length of stabs strings. */
|
|
|
|
|
|
|
|
#define DBX_CONTIN_LENGTH 0
|
|
|
|
|
2002-09-29 15:16:44 +02:00
|
|
|
/* gdb needs a null N_SO at the end of each file for scattered loading. */
|
2001-04-12 04:13:00 +02:00
|
|
|
|
dbxout.c (asmfile): Delete.
* dbxout.c (asmfile): Delete. All uses changed to asm_out_file.
(DBX_BLOCKS_FUNCTION_RELATIVE, DBX_LINES_FUNCTION_RELATIVE):
Default to 0.
(dbxout_source_line): Use DBX_OUTPUT_SOURCE_LINE when defined.
When it is not, but DBX_LINES_FUNCTION_RELATIVE is true, emit
an internal label and an N_SLINE .stabn whose value is the
difference between that label and the function entry label.
(dbxout_finish): If DBX_OUTPUT_MAIN_SOURCE_FILE_END is not defined,
but DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END is, emit a
label and an N_SO stab with an empty string referring to it.
(dbx_output_lbrac, dbx_output_rbrac): Use if statement instead
of #ifdef directive to test DBX_BLOCKS_FUNCTION_RELATIVE.
(dbxout_type_methods, dbxout_symbol): Remove #if 0 block.
(dbxout_prepare_symbol): Remove #ifdef WINNING_GDB block, this
macro is never defined.
* sdbout.c (sdbout_source_line_counter): Delete.
(PUT_SDB_SRC_FILE): Delete. Uses replaced with sole definition.
(sdbout_source_line): Use SDB_OUTPUT_SOURCE_LINE, which takes
only two arguments.
* xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Rename ASM_OUTPUT_LINE.
* config/dbxcoff.h, config/dbxelf.h: Remove unncessary #undefs.
* config/c4x/c4x.h, config/pa/pa.h: Remove unnecessary macro
definitions (identical to default).
* config/darwin.h, config/dbxcoff.h, config/dbxelf.h, config/ptx4.h
* config/h8300/coff.h, config/pa/som.h, config/sh/elf.h:
Define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END, not
DBX_OUTPUT_MAIN_SOURCE_FILE_END.
* config/dbxcoff.h, config/dbxelf.h, config/ptx4.h
* config/mcore/mcore-pe.h, config/pa/som.h, config/sh/elf.h:
Define DBX_LINES_FUNCTION_RELATIVE, not ASM_OUTPUT_SOURCE_LINE.
* config/alpha/alpha-protos.h: Don't prototype alpha_output_lineno.
* config/alpha/alpha.c: Move declaration of num_source_filenames up.
(alpha_start_function): Use SDB_OUTPUT_SOURCE_LINE.
(sym_lineno): Delete.
(alpha_output_filename): Do not emit N_SOL stabs here. Remove
now-unused variable.
(alpha_output_lineno): Delete.
* config/mips/mips-protos.h: Don't prototype mips_output_lineno.
* config/mips/mips.c (mips_output_filename): Don't use
ASM_OUTPUT_FILENAME. Don't emit N_SOL stabs here.
(mips_output_lineno): Delete.
(mips_output_function_prologue: Use SDB_OUTPUT_SOURCE_LINE.
* config/alpha/alpha.h: Define DBX_OUTPUT_SOURCE_LINE and
SDB_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE.
* config/mips/mips.h: Likewise. Don't define ASM_OUTPUT_FILENAME.
* config/mips/sdb.h: Use SDB_OUTPUT_SOURCE_LINE.
* config/avr/avr.h: Don't define ASM_OUTPUT_SOURCE_LINE.
* config/mmix/mmix.h: Likewise.
* config/mmix/mmix.c (mmix_asm_output_source_line): Delete.
* config/mmix/mmix-protos.h: Don't prototype it.
* config/alpha/unicosmk.h: Also #undef PREFERRED_DEBUGGING_TYPE;
no need to #undef ASM_OUTPUT_SOURCE_LINE.
* config/arm/aout.h: Remove RISCiX-specific definition of
DBX_OUTPUT_MAIN_SOURCE_FILENAME.
* config/m32r/m32r.h: Define DBX_OUTPUT_SOURCE_LINE, not
ASM_OUTPUT_SOURCE_LINE.
* config/rs6000/rs6000.h: (ASM_OUTPUT_SOURCE_LINE): Rename
DBX_OUTPUT_SOURCE_LINE. Don't use current_function_func_begin_label.
* config/vax/elf.h: No need to define DBX_OUTPUT_FUNCTION_END.
* doc/tm.texi: Update.
From-SVN: r89357
2004-10-21 02:53:47 +02:00
|
|
|
#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2004-10-26 08:09:05 +02:00
|
|
|
/* GCC's definition of 'one_only' is the same as its definition of 'weak'. */
|
|
|
|
#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)
|
2004-03-12 18:09:03 +01:00
|
|
|
|
2004-10-26 08:09:05 +02:00
|
|
|
/* Mach-O supports 'weak imports', and 'weak definitions' in coalesced
|
|
|
|
sections. machopic_select_section ensures that weak variables go in
|
|
|
|
coalesced sections. Weak aliases (or any other kind of aliases) are
|
|
|
|
not supported. Weak symbols that aren't visible outside the .s file
|
|
|
|
are not supported. */
|
|
|
|
#define ASM_WEAKEN_DECL(FILE, DECL, NAME, ALIAS) \
|
|
|
|
do { \
|
|
|
|
if (ALIAS) \
|
|
|
|
{ \
|
diagnostic.c (warning): Accept parameter to classify warning option.
* diagnostic.c (warning): Accept parameter to classify warning option.
(warning0): New, for when a pointer to an error() like function is needed.
* errors.c (warning): Likewise.
* errors.h (warning, warning0): Adjust prototypes.
* toplev.h (warning, warning0): Likewise.
* attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c,
c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c,
c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c,
fold-const.c, fortran/trans-decl.c, function.c, gcse.c,
genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c,
reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c,
tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c,
tree-ssa.c, tree.c, varasm.c: Adjust warning() callers.
* config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c,
config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c,
config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c,
config/darwin.c, config/darwin.h, config/h8300/h8300.c,
config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c,
config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c,
config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c,
config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c,
config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h,
config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h,
config/rs6000/aix52.h, config/rs6000/darwin.h,
config/rs6000/rs6000-c.c, config/rs6000/rs6000.c,
config/s390/s390.c, config/sh/sh.c, config/sh/sh.h,
config/sh/symbian.c, config/sol2-c.c, config/sol2.c,
config/stormy16/stormy16.c, config/v850/v850-c.c,
config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning()
callers.
* ada/misc.c: Adjust warning() callers.
* cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c,
cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c,
cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c,
cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers.
* fortran/trans-decl.c: Adjust warning() callers.
* java/class.c, java/decl.c, java/expr.c, java/jcf-io.c,
java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning()
callers.
* objc/objc-act.c: Adjust warning() callers.
* treelang/parse.y: Adjust warning() callers.
From-SVN: r98633
2005-04-23 23:29:07 +02:00
|
|
|
warning (0, "alias definitions not supported in Mach-O; ignored"); \
|
2004-10-26 08:09:05 +02:00
|
|
|
break; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
if (! DECL_EXTERNAL (DECL) && TREE_PUBLIC (DECL)) \
|
|
|
|
targetm.asm_out.globalize_label (FILE, NAME); \
|
|
|
|
if (DECL_EXTERNAL (DECL)) \
|
|
|
|
fputs ("\t.weak_reference ", FILE); \
|
2004-10-28 01:02:39 +02:00
|
|
|
else if (! lookup_attribute ("weak", DECL_ATTRIBUTES (DECL)) \
|
|
|
|
&& lookup_attribute ("weak_import", DECL_ATTRIBUTES (DECL))) \
|
|
|
|
break; \
|
2004-10-26 08:09:05 +02:00
|
|
|
else if (TREE_PUBLIC (DECL)) \
|
|
|
|
fputs ("\t.weak_definition ", FILE); \
|
|
|
|
else \
|
|
|
|
break; \
|
|
|
|
assemble_name (FILE, NAME); \
|
|
|
|
fputc ('\n', FILE); \
|
|
|
|
} while (0)
|
2004-03-12 18:09:03 +01:00
|
|
|
|
2004-10-27 23:03:43 +02:00
|
|
|
/* Darwin has the pthread routines in libSystem, which every program
|
|
|
|
links to, so there's no need for weak-ness for that. */
|
|
|
|
#define GTHREAD_USE_WEAK 0
|
|
|
|
|
2005-08-04 01:35:06 +02:00
|
|
|
/* The Darwin linker imposes two limitations on common symbols: they
|
2004-03-12 18:09:03 +01:00
|
|
|
can't have hidden visibility, and they can't appear in dylibs. As
|
2005-08-04 01:35:06 +02:00
|
|
|
a consequence, we should never use common symbols to represent
|
2004-03-12 18:09:03 +01:00
|
|
|
vague linkage. */
|
|
|
|
#undef USE_COMMON_FOR_ONE_ONLY
|
|
|
|
#define USE_COMMON_FOR_ONE_ONLY 0
|
|
|
|
|
2004-06-04 01:15:01 +02:00
|
|
|
/* The Darwin linker doesn't want coalesced symbols to appear in
|
2004-03-12 18:09:03 +01:00
|
|
|
a static archive's table of contents. */
|
2004-06-04 01:15:01 +02:00
|
|
|
#undef TARGET_WEAK_NOT_IN_ARCHIVE_TOC
|
|
|
|
#define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 1
|
2004-03-12 18:09:03 +01:00
|
|
|
|
|
|
|
/* We make exception information linkonce. */
|
|
|
|
#undef TARGET_USES_WEAK_UNWIND_INFO
|
|
|
|
#define TARGET_USES_WEAK_UNWIND_INFO 1
|
|
|
|
|
|
|
|
/* We need to use a nonlocal label for the start of an EH frame: the
|
|
|
|
Darwin linker requires that a coalesced section start with a label. */
|
|
|
|
#undef FRAME_BEGIN_LABEL
|
|
|
|
#define FRAME_BEGIN_LABEL "EH_frame"
|
|
|
|
|
2005-08-04 01:35:06 +02:00
|
|
|
/* Emit a label for the FDE corresponding to DECL. EMPTY means
|
2004-03-12 18:09:03 +01:00
|
|
|
emit a label for an empty FDE. */
|
|
|
|
#define TARGET_ASM_EMIT_UNWIND_LABEL darwin_emit_unwind_label
|
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
/* Our profiling scheme doesn't LP labels and counter words. */
|
|
|
|
|
linux.h (NO_PROFILE_COUNTERS): Define to 1.
* config/i386/linux.h (NO_PROFILE_COUNTERS): Define to 1.
* config/i386/freebsd.h (NO_PROFILE_COUNTERS): Likewise.
* config/i386/netbsd-elf.h (NO_PROFILE_COUNTERS): Likewise.
* config/xtensa/xtensa.h (NO_PROFILE_COUTNERS): Likewise.
* config/darwin.h (NO_PROFILE_COUNTERS): Likewise.
* final.c (NO_PROFILE_COUNTERS): Define to 0 if not defined.
(profile_function): Allow NO_PROFILE_COUNTERS to be non-constant.
* config/rs6000/rs6000.c (output_profile_hook): Likewise.
* configure.in (powerpc*-*, s390*-*): Set tls_as_opt.
Pass it to $gcc_cv_as.
* configure: Rebuilt.
* config/rs6000/rs6000.c (rs6000_abi_name): Remove initializer.
(print_operand): Allow TARGET_AIX to be non-constant.
(rs6000_aix_emit_builtin_unwind_init, rs6000_emit_eh_toc_restore):
Define unconditionally.
(rs6000_elf_declare_function_name): New function.
* config/rs6000/rs6000.md (eh_return): Allow TARGET_AIX to be
non-constant.
* config/rs6000/linux64.h [!RS6000_BI_ARCH] (TARGET_64BIT): Define
to 1.
(DEFAULT_ARCH64_P, RS6000_BI_ARCH_P): Define.
[IN_LIBGCC2] (TARGET_64BIT): Define based on whether __powerpc64__
is defined.
(TARGET_AIX): Define to 1 if TARGET_64BIT.
(PROCESSOR_DEFAULT): Remove.
(TARGET_RELOCATABLE, RS6000_ABI_NAME, INVALID_64BIT,
INVALID_32BIT, SUBSUBTARGET_OVERRIDE_OPTIONS): Define.
[RS6000_BI_ARCH] (OVERRIDE_OPTIONS, ASM_FILE_START): Define.
(ASM_DEFAULT_SPEC, ASM_SPEC, LINK_OS_LINUX_SPEC): Define for both
-m32 and -m64.
(MULTILIB_DEFAULTS): Define.
(SUBSUBTARGET_EXTRA_SPECS): Define.
(ASM_SPEC32, ASM_SPEC64, ASM_SPEC_COMMON): Define.
(TARGET_TOC): Define only if !RS6000_BI_ARCH.
(TARGET_NO_TOC): Remove.
[!RS6000_BI_ARCH] (TARGET_RELOCATABLE, TARGET_EABI,
TARGET_PROTOTYPE): Define to 0.
(NO_PROFILE_COUNTERS): Define to TARGET_64BIT.
(PROFILE_HOOK): Only call output_profile_hook if TARGET_64BIT.
(ADJUST_FIELD_ALIGN, ROUND_TYPE_ALIGN): Adjust to work properly
if !TARGET_64BIT.
(USER_LABEL_PREFIX): Remove.
(JUMP_TABLES_IN_TEXT_SECTION): Define to TARGET_64BIT.
(SETUP_FRAME_ADDRESSES): Only call rs6000_aix_emit_builtin_unwind_init
if TARGET_64BIT.
(TARGET_OS_CPP_BUILTINS): Handle both -m32 and -m64.
(LINK_OS_LINUX_SPEC32, LINK_OS_LINUX_SPEC64): Define.
(STARTFILE_LINUX_SPEC, ENDFILE_LINUX_SPEC): Remove.
(TOC_SECTION_ASM_OP): Define depending on TARGET_64BIT.
(MINIMAL_TOC_SECTION_ASM_OP): Likewise.
(SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Define depending on
TARGET_64BIT.
(RS6000_CALL_GLUE): Likewise.
(SAVE_FP_PREFIX, SAVE_FP_SUFFIX, RESTORE_FP_PREFIX,
RESTORE_FP_SUFFIX): Likewise.
(ASM_DECLARE_FUNCTION_NAME): Remove.
(ASM_DECLARE_FUNCTION_SIZE, ASM_OUTPUT_SOURCE_LINE,
DBX_OUTPUT_BRAC, DBX_OUTPUT_NFUN): Only output dot before function
name if TARGET_64BIT.
(ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Handle both TARGET_64BIT and
!TARGET_64BIT.
(ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Remove undefs.
(ASM_PREFERRED_EH_DATA_FORMAT): Take TARGET_64BIT into account.
(DRAFT_V4_STRUCT_RET): Define.
(SIGNAL_FRAMESIZE): New enum value.
(MD_FALLBACK_FRAME_STATE_FOR): Define.
* config/rs6000/default64.h: New file.
* config/rs6000/sysv4.h (SUBTARGET_SWITCHES): Add -m32 and -m64
options.
(SUBTARGET_OVERRIDE_OPTIONS): If rs6000_abi_name is NULL, set it
to RS6000_ABI_NAME. Only disallow mixing of -fPIC with -mcall-aixdesc
if !TARGET_64BIT.
[!RS6000_BI_ARCH] (SUBSUBTARGET_OVERRIDE_OPTIONS): Define.
(ASM_DECLARE_FUNCTION_NAME): Use rs6000_elf_declare_function_name
function.
(TARGET_OS_SYSV_CPP_BUILTINS): Define.
(TARGET_OS_CPP_BUILTINS): Use it.
(CPP_SYSV_SPEC): Remove.
(CPP_SPEC): Remove cpp_sysv.
(SUBTARGET_EXTRA_SPECS): Remove cpp_sysv.
Add SUBSUBTARGET_EXTRA_SPECS.
(SUBSUBTARGET_EXTRA_SPECS): Define.
* config/rs6000/biarch64.h: New file.
* config/rs6000/rs6000-protos.h (rs6000_elf_declare_function_name):
New prototype.
* config/rs6000/x-linux64: New file.
* config/rs6000/t-linux64: Build -m64, -m32 and -m32 -msoft-float
multilibs.
* config/rs6000/eabi-ci.asm: Protect with #ifndef __powerpc64__.
* config/rs6000/eabi-cn.asm: Likewise.
* config/rs6000/tramp.asm: Likewise.
* config/rs6000/sol-ci.asm: Likewise.
* config/rs6000/sol-cn.asm: Likewise.
* config/rs6000/linux.h (TARGET_64BIT): Define to 0.
(TARGET_OS_CPP_BUILTINS): Use TARGET_OS_SYSV_CPP_BUILTINS.
* config/rs6000/ppc-asm.h: Move __powerpc64__ section before
_CALL_AIXDESC section.
* config.gcc (powerpc64-*-linux*): Configure a bi-arch compiler,
defaulting to -m64 unless --with-cpu= is one of the 32-bit CPUs
or default32.
Co-Authored-By: Alan Modra <amodra@bigpond.net.au>
From-SVN: r67442
2003-06-04 17:23:42 +02:00
|
|
|
#define NO_PROFILE_COUNTERS 1
|
2001-04-12 04:13:00 +02:00
|
|
|
|
|
|
|
#undef INIT_SECTION_ASM_OP
|
|
|
|
#define INIT_SECTION_ASM_OP
|
|
|
|
|
|
|
|
#undef INVOKE__main
|
|
|
|
|
2001-08-10 00:33:35 +02:00
|
|
|
#define TARGET_ASM_CONSTRUCTOR machopic_asm_out_constructor
|
|
|
|
#define TARGET_ASM_DESTRUCTOR machopic_asm_out_destructor
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2002-09-13 06:00:56 +02:00
|
|
|
/* Always prefix with an underscore. */
|
|
|
|
|
|
|
|
#define USER_LABEL_PREFIX "_"
|
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
/* Don't output a .file directive. That is only used by the assembler for
|
|
|
|
error reporting. */
|
2003-06-27 18:08:43 +02:00
|
|
|
#undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
|
|
|
|
#define TARGET_ASM_FILE_START_FILE_DIRECTIVE false
|
2001-04-12 04:13:00 +02:00
|
|
|
|
config.gcc (with_cpu handling): Translate sparc64 in $machine to --with-cpu=v9.
* config.gcc (with_cpu handling): Translate sparc64 in
$machine to --with-cpu=v9.
* config/alpha/alpha.c
(TARGET_ASM_GLOBALIZE_LABEL [TARGET_ABI_UNICOSMK]): Correct definition.
(alpha_setup_incoming_varargs): #ifdef out when TARGET_ABI_UNICOSMK.
* target.h: New hook asm_out.file_end.
* target.h: Update to match. New hook macro TARGET_ASM_FILE_END.
* toplev.c (compile_file: Use targetm.asm_out.file_end.
* system.h: Poison ASM_FILE_END.
* varasm.c (file_end_indicate_exec_stack): New.
* output.h: Prototype it.
* doc/tm.texi: Document TARGET_ASM_FILE_END and
file_end_indicate_exec_stack. Delete references to attasm.h.
* config/darwin.h (TARGET_ASM_FILE_END): Reset to darwin_file_end.
(ASM_FILE_END): Delete; move code...
* config/darwin.c (darwin_file_end): Here; new function.
* config/darwin-protos.h: Prototype it.
* config/alpha/alpha.c (unicosmk_asm_file_end): Make static,
rename unicosmk_file_end.
* config/arm/aof.h (ASM_FILE_END): Delete; move code...
* config/arm/arm.c (aof_file_end): ... here; new static function.
Set TARGET_ASM_FILE_END to aof_file_end if AOF_ASSEMBLER.
Make aof_dump_imports and aof_dump_pic_table static.
* config/avr/avr.c (asm_file_end): Rename avr_file_end, make static.
Set TARGET_ASM_FILE_END to avr_file_end.
* config/c4x/c4x.c (c4x_file_end): Make static. Take no arguments.
Set TARGET_ASM_FILE_END to c4x_file_end.
* config/h8300/h8300.c (asm_file_end): Rename h8300_file_end,
make static. Take no arguments. Set TARGET_ASM_FILE_END to
h8300_file_end.
* config/i370/i370.h (ASM_FILE_END): Delete; move code...
* config/i370/i370.c (i370_file_end): ... here; new static function.
Set TARGET_ASM_FILE_END to i370_file_end.
* config/i386/i386.c (ix86_asm_file_end): Rename ix86_file_end.
Take no arguments. Call file_end_indicate_exec_stack if
NEED_INDICATE_EXEC_STACK; don't use SUBTARGET_FILE_END.
* config/i386/i386.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END.
Define NEED_INDICATE_EXEC_STACK to 0.
* config/i386/linux.h, config/i386/linux64.h: Redefine
NEED_INDICATE_EXEC_STACK to 1 instead of setting SUBTARGET_FILE_END.
* config/i386/winnt.c (i386_pe_asm_file_end): Rename to
i386_pe_file_end. Take no arguments. Use ix86_file_end.
* config/ia64/ia64.c (ia64_hpux_asm_file_end): Rename to
ia64_hpux_file_end, make static. Take no arguments.
* config/ip2k/ip2k.c (asm_file_start, asm_file_end,
commands_in_prologues, commands_in_epilogues): Delete.
(function_epilogue): Update to match.
* config/mips/mips.c (mips_asm_file_end): Rename mips_file_end,
make static. Take no arguments.
(iris6_asm_file_end): Rename iris6_file_end, make static, use
mips_file_end, take no arguments.
Set TARGET_ASM_FILE_END to iris6_file_end or mips_file_end as
appropriate.
* config/mmix/mmix.c (mmix_asm_file_end): Rename mmix_file_end,
make static, take no arguments. Set TARGET_ASM_FILE_END to
mmix_file_end.
* config/pa/pa.c (output_deferred_plabels): Make static, take
no arguments. Set TARGET_ASM_FILE_END to output_deferred_plabels.
* config/rs6000/xcoff.h (TARGET_ASM_FILE_END): Set it.
(ASM_FILE_END): Delete; move code...
* config/rs6000/rs6000.c (rs6000_xcoff_file_end): ... here;
new static function.
* config/avr/avr.h, config/cris/cris.h, config/h8300/h8300.h
* config/mmix/mmix.h, config/mips/iris6.h, config/mips/mips.h:
Don't set ASM_FILE_END.
* config/alpha/linux-elf.h, config/m68k/linux.h, config/rs6000/linux.h
* config/rs6000/linux64.h, config/s390/linux.h, config/sparc/linux.h
* config/sparc/linux64.h: Set TARGET_ASM_FILE_END to
file_end_indicate_exec_stack; don't set ASM_FILE_END.
* config/alpha/unicosmk.h, config/i386/cygming.h
* config/ia64/hpux.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END.
* config/arm/arm-protos.h, config/alpha/alpha-protos.h
* config/avr/avr-protos.h, config/c4x/c4x-protos.h
* config/h8300/h8300-protos.h, config/ia64/ia64-protos.h
* config/ip2k/ip2k-protos.h, config/mips/mips-protos.h
* config/mmix/mmix-protos.h, config/pa/pa-protos.h: Update.
From-SVN: r67591
2003-06-07 19:11:48 +02:00
|
|
|
#undef TARGET_ASM_FILE_END
|
|
|
|
#define TARGET_ASM_FILE_END darwin_file_end
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2002-07-17 02:19:30 +02:00
|
|
|
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
|
Mon May 12 11:32:53 CEST 2003 Jan Hubicka <jh@suse.cz>
* expr.h (assemble_static_space): Update prototype.
* output.h (assemble_zeros, output_constant): Likewise.
* elfos.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): Make it 64bit clean
* alpha.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASK_OUTPUT_LOCAL): Make
it 64bit clean.
* elf.h (ASM_OTUPUT_SKIP): Likewise.
* unicosmk.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMM): Likewise.
* arm.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* aout.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* unknown-elf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* avr.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP): Expect
HOST_WIDE_INT operand.
* c4x.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP,
ASM_OUTPUT_BSS): Expect HOST_WIDE_INT operand.
* aout.h (ASM_OTUPUT_SKIP): Likewise.
* cris.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise.
* darwin.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON): Likewise.
* dsp16xx.h (ASM_OTUPUT_SKIP): Likewise.
* frv.h (ASM_OTUPUT_SKIP): Likewise.
* h8300.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_LOCAL): Likewise.
* 370.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Make it 64bit
clean.
* att.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand.
* bsd.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Make it 64bit clean.
* darwin.h (ASM_OUTPUT_SKIP): Make it 64bit clean..
* sco5.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Expect
HOST_WIDE_INT operand
* svr3gas.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Expect HOST_WIDE_INT operand
* sysv3.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand
* i960.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON,
ASM_OUTPUT_ALIGNED_LOCAL): Expect HOST_WIDE_INT operand
* ip2k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* m32r.h (ASM_OUTPUT_COMMON): Likewise.
* 3b1.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* amix.h (ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
* crds.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
* hp320.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* m68k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* m68kelf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* m68kv4.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* mot3300.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise.
* netbsd-elf.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON,
ASM_OUTPUT_SKIP): Likewise.
* sgs.h (ASM_OUTPUT_SKIP): Likewise.
* tower-as.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON,
ASM_OUTPUT_SKIP): Likewise.
* m88k.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP):
Likewise.
* mcore.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_BSS, ASM_OUTPUT_SKIP): Likewise.
* iris.h (ASM_OUTPUT_LOCAL): Likewise.
* mips.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise.
* ns32k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Make it 64bit clean.
* pa-pro-end.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL):
Make it 64bit clean.
* pa.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL,
ASM_OUTPUT_SKIP): Make it 64bit clean.
* hpux.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL): Make it
64bit clean.
* romp.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect
HOST_WIDE_INT argument
* s390.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT argument.
* sh.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect
HOST_WIDE_INT argument
* sol2.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument
* sparc.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): HOST_WIDE_INT argument
* svr3.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument
* vax.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
HOST_WIDE_INT argument
* vaxv.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument
* xtensa.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument
* varasm.c (asm_output_bss, asm_output_aligned_bss,
asm_emit_uninitialized, assemble_zeros, assemble_static_space):
HOST_WIDE_INT argument
From-SVN: r66713
2003-05-12 11:51:36 +02:00
|
|
|
fprintf (FILE, "\t.space "HOST_WIDE_INT_PRINT_UNSIGNED"\n", SIZE)
|
2002-07-17 02:19:30 +02:00
|
|
|
|
2002-09-29 15:16:44 +02:00
|
|
|
/* Give ObjC methods pretty symbol names. */
|
2001-04-12 04:13:00 +02:00
|
|
|
|
|
|
|
#undef OBJC_GEN_METHOD_LABEL
|
|
|
|
#define OBJC_GEN_METHOD_LABEL(BUF,IS_INST,CLASS_NAME,CAT_NAME,SEL_NAME,NUM) \
|
|
|
|
do { if (CAT_NAME) \
|
|
|
|
sprintf (BUF, "%c[%s(%s) %s]", (IS_INST) ? '-' : '+', \
|
|
|
|
(CLASS_NAME), (CAT_NAME), (SEL_NAME)); \
|
|
|
|
else \
|
|
|
|
sprintf (BUF, "%c[%s %s]", (IS_INST) ? '-' : '+', \
|
|
|
|
(CLASS_NAME), (SEL_NAME)); \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
/* The RTTI data (e.g., __ti4name) is common and public (and static),
|
|
|
|
but it does need to be referenced via indirect PIC data pointers.
|
2004-07-23 06:35:17 +02:00
|
|
|
The machopic_define_symbol calls are telling the machopic subsystem
|
2001-04-12 04:13:00 +02:00
|
|
|
that the name *is* defined in this module, so it doesn't need to
|
|
|
|
make them indirect. */
|
|
|
|
|
|
|
|
#undef ASM_DECLARE_OBJECT_NAME
|
|
|
|
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
|
|
|
|
do { \
|
2003-07-27 03:48:11 +02:00
|
|
|
const char *xname = NAME; \
|
|
|
|
if (GET_CODE (XEXP (DECL_RTL (DECL), 0)) != SYMBOL_REF) \
|
|
|
|
xname = IDENTIFIER_POINTER (DECL_NAME (DECL)); \
|
2004-10-26 08:09:05 +02:00
|
|
|
if (! DECL_WEAK (DECL) \
|
|
|
|
&& ((TREE_STATIC (DECL) \
|
|
|
|
&& (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
|
|
|
|
|| DECL_INITIAL (DECL))) \
|
2004-07-23 06:35:17 +02:00
|
|
|
machopic_define_symbol (DECL_RTL (DECL)); \
|
2003-07-27 03:48:11 +02:00
|
|
|
if ((TREE_STATIC (DECL) \
|
|
|
|
&& (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
|
|
|
|
|| DECL_INITIAL (DECL)) \
|
target.h (encode_section_info): Add new argument carrying the RTL to be modified by the hook.
* target.h (encode_section_info): Add new argument carrying
the RTL to be modified by the hook.
* varasm.c (make_decl_rtl, output_constant_def): Update calls
to encode_section_info.
(default_encode_section_info): Take and use RTL argument,
don't use TREE_CST_RTL or DECL_RTL.
* output.h: Update prototype of default_encode_section_info.
* config/darwin.h (ASM_DECLARE_OBJECT_NAME)
(ASM_DECLARE_FUNCTION_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL):
Update calls to encode_section_info.
* config/darwin.c, config/arm/arm.c, config/arm/pe.c
* config/h8300/h8300.c, config/i386/winnt.c, config/m32r/m32r.c
* config/m68hc11/m68hc11.c, config/m88k/m88k.c, config/mcore/mcore.c
* config/mips/mips.c, config/mmix/mmix.c, config/pa/pa.c
* config/romp/romp.c, config/rs6000/rs6000.c, config/s390/s390.c
* config/v850/v850.c (TARGET_ENCODE_SECTION_INFO definitions):
Take and use RTL argument, don't use TREE_CST_RTL or DECL_RTL,
except for PE dllimport/dllexport. Update calls to
default_encode_section_info.
* config/darwin-protos.h, config/arm/arm-protos.h, config/i386-protos.h:
Update prototypes.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update.
From-SVN: r65859
2003-04-20 20:20:39 +02:00
|
|
|
(* targetm.encode_section_info) (DECL, DECL_RTL (DECL), false); \
|
2003-07-27 03:48:11 +02:00
|
|
|
ASM_OUTPUT_LABEL (FILE, xname); \
|
2004-10-26 08:09:05 +02:00
|
|
|
/* Darwin doesn't support zero-size objects, so give them a \
|
2003-07-27 03:48:11 +02:00
|
|
|
byte. */ \
|
|
|
|
if (tree_low_cst (DECL_SIZE_UNIT (DECL), 1) == 0) \
|
|
|
|
assemble_zeros (1); \
|
2001-09-04 22:58:19 +02:00
|
|
|
} while (0)
|
|
|
|
|
2004-10-26 08:09:05 +02:00
|
|
|
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
|
2001-09-04 22:58:19 +02:00
|
|
|
do { \
|
2004-10-26 08:09:05 +02:00
|
|
|
const char *xname = NAME; \
|
|
|
|
if (GET_CODE (XEXP (DECL_RTL (DECL), 0)) != SYMBOL_REF) \
|
|
|
|
xname = IDENTIFIER_POINTER (DECL_NAME (DECL)); \
|
|
|
|
if (! DECL_WEAK (DECL) \
|
|
|
|
&& ((TREE_STATIC (DECL) \
|
|
|
|
&& (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
|
|
|
|
|| DECL_INITIAL (DECL))) \
|
|
|
|
machopic_define_symbol (DECL_RTL (DECL)); \
|
|
|
|
if ((TREE_STATIC (DECL) \
|
|
|
|
&& (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
|
|
|
|
|| DECL_INITIAL (DECL)) \
|
target.h (encode_section_info): Add new argument carrying the RTL to be modified by the hook.
* target.h (encode_section_info): Add new argument carrying
the RTL to be modified by the hook.
* varasm.c (make_decl_rtl, output_constant_def): Update calls
to encode_section_info.
(default_encode_section_info): Take and use RTL argument,
don't use TREE_CST_RTL or DECL_RTL.
* output.h: Update prototype of default_encode_section_info.
* config/darwin.h (ASM_DECLARE_OBJECT_NAME)
(ASM_DECLARE_FUNCTION_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL):
Update calls to encode_section_info.
* config/darwin.c, config/arm/arm.c, config/arm/pe.c
* config/h8300/h8300.c, config/i386/winnt.c, config/m32r/m32r.c
* config/m68hc11/m68hc11.c, config/m88k/m88k.c, config/mcore/mcore.c
* config/mips/mips.c, config/mmix/mmix.c, config/pa/pa.c
* config/romp/romp.c, config/rs6000/rs6000.c, config/s390/s390.c
* config/v850/v850.c (TARGET_ENCODE_SECTION_INFO definitions):
Take and use RTL argument, don't use TREE_CST_RTL or DECL_RTL,
except for PE dllimport/dllexport. Update calls to
default_encode_section_info.
* config/darwin-protos.h, config/arm/arm-protos.h, config/i386-protos.h:
Update prototypes.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update.
From-SVN: r65859
2003-04-20 20:20:39 +02:00
|
|
|
(* targetm.encode_section_info) (DECL, DECL_RTL (DECL), false); \
|
2004-10-26 08:09:05 +02:00
|
|
|
ASM_OUTPUT_LABEL (FILE, xname); \
|
2001-04-12 04:13:00 +02:00
|
|
|
} while (0)
|
|
|
|
|
2003-07-27 03:48:11 +02:00
|
|
|
#define ASM_DECLARE_CONSTANT_NAME(FILE, NAME, EXP, SIZE) \
|
|
|
|
do { \
|
|
|
|
ASM_OUTPUT_LABEL (FILE, NAME); \
|
|
|
|
/* Darwin doesn't support zero-size objects, so give them a \
|
|
|
|
byte. */ \
|
|
|
|
if ((SIZE) == 0) \
|
|
|
|
assemble_zeros (1); \
|
|
|
|
} while (0)
|
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
/* Wrap new method names in quotes so the assembler doesn't gag.
|
|
|
|
Make Objective-C internal symbols local. */
|
|
|
|
|
|
|
|
#undef ASM_OUTPUT_LABELREF
|
system.h (STRIP_NAME_ENCODING): Poison it.
* system.h (STRIP_NAME_ENCODING): Poison it.
* output.h (STRIP_NAME_ENCODING): Remove.
(default_strip_name_encoding): Declare.
* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
* target.h (strip_name_encoding): New.
* varasm.c (default_strip_name_encoding): New.
* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
config/v850/v850.h: Use the hook, not the macro.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
config/v850/v850.c, config/v850/v850.h:
Move STRIP_NAME_ENCODING to out-of-line function and add
TARGET_STRIP_NAME_ENCODING.
* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
with TARGET_STRIP_NAME_ENCODING referencing existing function;
make function static.
* xcoffout.c: Include target.h
* Makefile.in (xcoffout.o): Update.
* config/avr/avr.c (avr_encode_section_info): Correct prototype.
* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
reloc argument unused.
* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.
* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
STRIP_NAME_ENCODING docs.
From-SVN: r53615
2002-05-19 09:55:48 +02:00
|
|
|
#define ASM_OUTPUT_LABELREF(FILE,NAME) \
|
|
|
|
do { \
|
2004-07-23 06:35:17 +02:00
|
|
|
const char *xname = (NAME); \
|
2003-07-16 21:05:53 +02:00
|
|
|
if (! strcmp (xname, "<pic base>")) \
|
|
|
|
machopic_output_function_base_name(FILE); \
|
|
|
|
else if (xname[0] == '&' || xname[0] == '*') \
|
system.h (STRIP_NAME_ENCODING): Poison it.
* system.h (STRIP_NAME_ENCODING): Poison it.
* output.h (STRIP_NAME_ENCODING): Remove.
(default_strip_name_encoding): Declare.
* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
* target.h (strip_name_encoding): New.
* varasm.c (default_strip_name_encoding): New.
* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
config/v850/v850.h: Use the hook, not the macro.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
config/v850/v850.c, config/v850/v850.h:
Move STRIP_NAME_ENCODING to out-of-line function and add
TARGET_STRIP_NAME_ENCODING.
* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
with TARGET_STRIP_NAME_ENCODING referencing existing function;
make function static.
* xcoffout.c: Include target.h
* Makefile.in (xcoffout.o): Update.
* config/avr/avr.c (avr_encode_section_info): Correct prototype.
* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
reloc argument unused.
* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.
* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
STRIP_NAME_ENCODING docs.
From-SVN: r53615
2002-05-19 09:55:48 +02:00
|
|
|
{ \
|
|
|
|
int len = strlen (xname); \
|
|
|
|
if (len > 6 && !strcmp ("$stub", xname + len - 5)) \
|
2004-07-23 06:35:17 +02:00
|
|
|
machopic_validate_stub_or_non_lazy_ptr (xname); \
|
system.h (STRIP_NAME_ENCODING): Poison it.
* system.h (STRIP_NAME_ENCODING): Poison it.
* output.h (STRIP_NAME_ENCODING): Remove.
(default_strip_name_encoding): Declare.
* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
* target.h (strip_name_encoding): New.
* varasm.c (default_strip_name_encoding): New.
* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
config/v850/v850.h: Use the hook, not the macro.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
config/v850/v850.c, config/v850/v850.h:
Move STRIP_NAME_ENCODING to out-of-line function and add
TARGET_STRIP_NAME_ENCODING.
* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
with TARGET_STRIP_NAME_ENCODING referencing existing function;
make function static.
* xcoffout.c: Include target.h
* Makefile.in (xcoffout.o): Update.
* config/avr/avr.c (avr_encode_section_info): Correct prototype.
* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
reloc argument unused.
* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.
* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
STRIP_NAME_ENCODING docs.
From-SVN: r53615
2002-05-19 09:55:48 +02:00
|
|
|
else if (len > 7 && !strcmp ("$stub\"", xname + len - 6)) \
|
2004-07-23 06:35:17 +02:00
|
|
|
machopic_validate_stub_or_non_lazy_ptr (xname); \
|
system.h (STRIP_NAME_ENCODING): Poison it.
* system.h (STRIP_NAME_ENCODING): Poison it.
* output.h (STRIP_NAME_ENCODING): Remove.
(default_strip_name_encoding): Declare.
* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
* target.h (strip_name_encoding): New.
* varasm.c (default_strip_name_encoding): New.
* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
config/v850/v850.h: Use the hook, not the macro.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
config/v850/v850.c, config/v850/v850.h:
Move STRIP_NAME_ENCODING to out-of-line function and add
TARGET_STRIP_NAME_ENCODING.
* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
with TARGET_STRIP_NAME_ENCODING referencing existing function;
make function static.
* xcoffout.c: Include target.h
* Makefile.in (xcoffout.o): Update.
* config/avr/avr.c (avr_encode_section_info): Correct prototype.
* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
reloc argument unused.
* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.
* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
STRIP_NAME_ENCODING docs.
From-SVN: r53615
2002-05-19 09:55:48 +02:00
|
|
|
else if (len > 14 && !strcmp ("$non_lazy_ptr", xname + len - 13)) \
|
2004-07-23 06:35:17 +02:00
|
|
|
machopic_validate_stub_or_non_lazy_ptr (xname); \
|
2005-05-27 01:19:29 +02:00
|
|
|
else if (len > 15 && !strcmp ("$non_lazy_ptr\"", xname + len - 14)) \
|
|
|
|
machopic_validate_stub_or_non_lazy_ptr (xname); \
|
2005-05-17 22:11:44 +02:00
|
|
|
if (xname[1] != '"' && name_needs_quotes (&xname[1])) \
|
|
|
|
fprintf (FILE, "\"%s\"", &xname[1]); \
|
|
|
|
else \
|
|
|
|
fputs (&xname[1], FILE); \
|
system.h (STRIP_NAME_ENCODING): Poison it.
* system.h (STRIP_NAME_ENCODING): Poison it.
* output.h (STRIP_NAME_ENCODING): Remove.
(default_strip_name_encoding): Declare.
* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
* target.h (strip_name_encoding): New.
* varasm.c (default_strip_name_encoding): New.
* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
config/v850/v850.h: Use the hook, not the macro.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
config/v850/v850.c, config/v850/v850.h:
Move STRIP_NAME_ENCODING to out-of-line function and add
TARGET_STRIP_NAME_ENCODING.
* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
with TARGET_STRIP_NAME_ENCODING referencing existing function;
make function static.
* xcoffout.c: Include target.h
* Makefile.in (xcoffout.o): Update.
* config/avr/avr.c (avr_encode_section_info): Correct prototype.
* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
reloc argument unused.
* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.
* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
STRIP_NAME_ENCODING docs.
From-SVN: r53615
2002-05-19 09:55:48 +02:00
|
|
|
} \
|
|
|
|
else if (xname[0] == '+' || xname[0] == '-') \
|
|
|
|
fprintf (FILE, "\"%s\"", xname); \
|
|
|
|
else if (!strncmp (xname, "_OBJC_", 6)) \
|
|
|
|
fprintf (FILE, "L%s", xname); \
|
|
|
|
else if (!strncmp (xname, ".objc_class_name_", 17)) \
|
|
|
|
fprintf (FILE, "%s", xname); \
|
2005-05-17 22:11:44 +02:00
|
|
|
else if (xname[0] != '"' && name_needs_quotes (xname)) \
|
|
|
|
fprintf (FILE, "\"%s\"", xname); \
|
system.h (STRIP_NAME_ENCODING): Poison it.
* system.h (STRIP_NAME_ENCODING): Poison it.
* output.h (STRIP_NAME_ENCODING): Remove.
(default_strip_name_encoding): Declare.
* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
* target.h (strip_name_encoding): New.
* varasm.c (default_strip_name_encoding): New.
* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
config/v850/v850.h: Use the hook, not the macro.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
config/v850/v850.c, config/v850/v850.h:
Move STRIP_NAME_ENCODING to out-of-line function and add
TARGET_STRIP_NAME_ENCODING.
* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
with TARGET_STRIP_NAME_ENCODING referencing existing function;
make function static.
* xcoffout.c: Include target.h
* Makefile.in (xcoffout.o): Update.
* config/avr/avr.c (avr_encode_section_info): Correct prototype.
* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
reloc argument unused.
* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.
* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
STRIP_NAME_ENCODING docs.
From-SVN: r53615
2002-05-19 09:55:48 +02:00
|
|
|
else \
|
2004-07-08 02:12:27 +02:00
|
|
|
asm_fprintf (FILE, "%U%s", xname); \
|
2001-04-12 04:13:00 +02:00
|
|
|
} while (0)
|
|
|
|
|
2002-07-17 02:19:30 +02:00
|
|
|
/* Output before executable code. */
|
|
|
|
#undef TEXT_SECTION_ASM_OP
|
2004-10-26 08:09:05 +02:00
|
|
|
#define TEXT_SECTION_ASM_OP "\t.text"
|
2002-07-17 02:19:30 +02:00
|
|
|
|
|
|
|
/* Output before writable data. */
|
|
|
|
|
|
|
|
#undef DATA_SECTION_ASM_OP
|
2004-10-26 08:09:05 +02:00
|
|
|
#define DATA_SECTION_ASM_OP "\t.data"
|
2002-07-17 02:19:30 +02:00
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
#undef ALIGN_ASM_OP
|
|
|
|
#define ALIGN_ASM_OP ".align"
|
|
|
|
|
|
|
|
#undef ASM_OUTPUT_ALIGN
|
|
|
|
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
|
|
|
|
if ((LOG) != 0) \
|
|
|
|
fprintf (FILE, "\t%s %d\n", ALIGN_ASM_OP, (LOG))
|
|
|
|
|
|
|
|
/* Ensure correct alignment of bss data. */
|
|
|
|
|
2005-08-04 01:35:06 +02:00
|
|
|
#undef ASM_OUTPUT_ALIGNED_DECL_LOCAL
|
varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P; invoke ENCODE_SECTION_INFO with first call flag.
* varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P;
invoke ENCODE_SECTION_INFO with first call flag.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/a29k/a29k.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arc/arc.h, config/arm/arm-protos.h,
config/arm/arm.h, config/arm/pe.c, config/arm/pe.h,
config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h,
config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h,
config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h,
config/d30v/d30v.h, config/h8300/h8300.h, config/i370/i370.h,
config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386.h,
config/i386/osfrose.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h,
config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h,
config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c,
config/m68hc11/m68hc11.h, config/m88k/m88k.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mips/mips.h, config/ns32k/ns32k.h,
config/pa/pa.h, config/romp/romp.h, config/rs6000/linux64.h,
config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c,
config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.h,
config/sh/sh.h, config/sparc/sparc.h,
config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c,
config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vms.h,
config/xtensa/xtensa.h, doc/tm.texi: ENCODE_SECTION_INFO now takes
FIRST argument. As needed, examine it and do nothing.
* config/darwin.h, config/alpha/alpha.h, config/arm/pe.h,
config/i386/cygwin.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h,
config/mcore/mcore.h: Remove REDO_SECTION_INFO_P.
* config/arm/t-pe (pe.o): Add dependencies.
From-SVN: r50236
2002-03-03 05:23:21 +01:00
|
|
|
#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \
|
|
|
|
do { \
|
2005-03-25 20:55:58 +01:00
|
|
|
unsigned HOST_WIDE_INT _new_size = SIZE; \
|
varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P; invoke ENCODE_SECTION_INFO with first call flag.
* varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P;
invoke ENCODE_SECTION_INFO with first call flag.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/a29k/a29k.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arc/arc.h, config/arm/arm-protos.h,
config/arm/arm.h, config/arm/pe.c, config/arm/pe.h,
config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h,
config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h,
config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h,
config/d30v/d30v.h, config/h8300/h8300.h, config/i370/i370.h,
config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386.h,
config/i386/osfrose.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h,
config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h,
config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c,
config/m68hc11/m68hc11.h, config/m88k/m88k.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mips/mips.h, config/ns32k/ns32k.h,
config/pa/pa.h, config/romp/romp.h, config/rs6000/linux64.h,
config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c,
config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.h,
config/sh/sh.h, config/sparc/sparc.h,
config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c,
config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vms.h,
config/xtensa/xtensa.h, doc/tm.texi: ENCODE_SECTION_INFO now takes
FIRST argument. As needed, examine it and do nothing.
* config/darwin.h, config/alpha/alpha.h, config/arm/pe.h,
config/i386/cygwin.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h,
config/mcore/mcore.h: Remove REDO_SECTION_INFO_P.
* config/arm/t-pe (pe.o): Add dependencies.
From-SVN: r50236
2002-03-03 05:23:21 +01:00
|
|
|
fputs (".lcomm ", (FILE)); \
|
|
|
|
assemble_name ((FILE), (NAME)); \
|
2005-03-25 20:55:58 +01:00
|
|
|
if (_new_size == 0) _new_size = 1; \
|
|
|
|
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", _new_size, \
|
varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P; invoke ENCODE_SECTION_INFO with first call flag.
* varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P;
invoke ENCODE_SECTION_INFO with first call flag.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/a29k/a29k.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arc/arc.h, config/arm/arm-protos.h,
config/arm/arm.h, config/arm/pe.c, config/arm/pe.h,
config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h,
config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h,
config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h,
config/d30v/d30v.h, config/h8300/h8300.h, config/i370/i370.h,
config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386.h,
config/i386/osfrose.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h,
config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h,
config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c,
config/m68hc11/m68hc11.h, config/m88k/m88k.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mips/mips.h, config/ns32k/ns32k.h,
config/pa/pa.h, config/romp/romp.h, config/rs6000/linux64.h,
config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c,
config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.h,
config/sh/sh.h, config/sparc/sparc.h,
config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c,
config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vms.h,
config/xtensa/xtensa.h, doc/tm.texi: ENCODE_SECTION_INFO now takes
FIRST argument. As needed, examine it and do nothing.
* config/darwin.h, config/alpha/alpha.h, config/arm/pe.h,
config/i386/cygwin.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h,
config/mcore/mcore.h: Remove REDO_SECTION_INFO_P.
* config/arm/t-pe (pe.o): Add dependencies.
From-SVN: r50236
2002-03-03 05:23:21 +01:00
|
|
|
floor_log2 ((ALIGN) / BITS_PER_UNIT)); \
|
|
|
|
if ((DECL) && ((TREE_STATIC (DECL) \
|
|
|
|
&& (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
|
|
|
|
|| DECL_INITIAL (DECL))) \
|
2004-07-23 06:35:17 +02:00
|
|
|
{ \
|
|
|
|
(* targetm.encode_section_info) (DECL, DECL_RTL (DECL), false); \
|
|
|
|
machopic_define_symbol (DECL_RTL (DECL)); \
|
|
|
|
} \
|
2001-04-12 04:13:00 +02:00
|
|
|
} while (0)
|
|
|
|
|
|
|
|
/* The maximum alignment which the object file format can support.
|
|
|
|
For Mach-O, this is 2^15. */
|
|
|
|
|
|
|
|
#undef MAX_OFILE_ALIGNMENT
|
|
|
|
#define MAX_OFILE_ALIGNMENT 0x8000
|
|
|
|
|
2002-09-29 15:16:44 +02:00
|
|
|
/* Create new Mach-O sections. */
|
2001-04-12 04:13:00 +02:00
|
|
|
|
|
|
|
#undef SECTION_FUNCTION
|
2001-07-03 22:38:37 +02:00
|
|
|
#define SECTION_FUNCTION(FUNCTION, SECTION, DIRECTIVE, OBJC) \
|
2003-08-17 12:00:04 +02:00
|
|
|
extern void FUNCTION (void); \
|
2001-04-12 04:13:00 +02:00
|
|
|
void \
|
2003-08-17 12:00:04 +02:00
|
|
|
FUNCTION (void) \
|
2001-04-12 04:13:00 +02:00
|
|
|
{ \
|
2001-07-03 22:38:37 +02:00
|
|
|
if (in_section != SECTION) \
|
2001-04-12 04:13:00 +02:00
|
|
|
{ \
|
|
|
|
if (OBJC) \
|
|
|
|
objc_section_init (); \
|
|
|
|
if (asm_out_file) \
|
2004-10-26 08:09:05 +02:00
|
|
|
fputs ("\t" DIRECTIVE "\n", asm_out_file); \
|
2001-04-12 04:13:00 +02:00
|
|
|
in_section = SECTION; \
|
2005-03-31 16:59:59 +02:00
|
|
|
if ((SECTION == in_text_coal) \
|
|
|
|
|| (SECTION == in_text_unlikely) \
|
|
|
|
|| (SECTION == in_text_unlikely_coal)) \
|
|
|
|
last_text_section = SECTION; \
|
2001-04-12 04:13:00 +02:00
|
|
|
} \
|
|
|
|
} \
|
|
|
|
|
|
|
|
/* Darwin uses many types of special sections. */
|
|
|
|
|
|
|
|
#undef EXTRA_SECTIONS
|
2004-10-26 08:09:05 +02:00
|
|
|
#define EXTRA_SECTIONS \
|
|
|
|
in_text_coal, in_text_unlikely, in_text_unlikely_coal, \
|
2001-04-12 04:13:00 +02:00
|
|
|
in_const, in_const_data, in_cstring, in_literal4, in_literal8, \
|
2004-10-26 08:09:05 +02:00
|
|
|
in_const_coal, in_const_data_coal, in_data_coal, \
|
2001-04-12 04:13:00 +02:00
|
|
|
in_constructor, in_destructor, in_mod_init, in_mod_term, \
|
2004-10-26 08:09:05 +02:00
|
|
|
in_objc_class, in_objc_meta_class, in_objc_category, \
|
|
|
|
in_objc_class_vars, in_objc_instance_vars, \
|
|
|
|
in_objc_cls_meth, in_objc_inst_meth, \
|
|
|
|
in_objc_cat_cls_meth, in_objc_cat_inst_meth, \
|
|
|
|
in_objc_selector_refs, \
|
|
|
|
in_objc_selector_fixup, \
|
|
|
|
in_objc_symbols, in_objc_module_info, \
|
|
|
|
in_objc_protocol, in_objc_string_object, \
|
|
|
|
in_objc_constant_string_object, \
|
|
|
|
in_objc_image_info, \
|
|
|
|
in_objc_class_names, in_objc_meth_var_names, \
|
|
|
|
in_objc_meth_var_types, in_objc_cls_refs, \
|
|
|
|
in_machopic_nl_symbol_ptr, \
|
|
|
|
in_machopic_lazy_symbol_ptr, \
|
|
|
|
in_machopic_symbol_stub, \
|
|
|
|
in_machopic_symbol_stub1, \
|
|
|
|
in_machopic_picsymbol_stub, \
|
|
|
|
in_machopic_picsymbol_stub1, \
|
|
|
|
in_darwin_exception, in_darwin_eh_frame, \
|
2001-04-12 04:13:00 +02:00
|
|
|
num_sections
|
|
|
|
|
|
|
|
#undef EXTRA_SECTION_FUNCTIONS
|
2004-10-26 08:09:05 +02:00
|
|
|
#define EXTRA_SECTION_FUNCTIONS \
|
|
|
|
static void objc_section_init (void); \
|
|
|
|
SECTION_FUNCTION (text_coal_section, \
|
|
|
|
in_text_coal, \
|
|
|
|
".section __TEXT,__textcoal_nt,coalesced," \
|
|
|
|
"pure_instructions", 0) \
|
|
|
|
SECTION_FUNCTION (text_unlikely_coal_section, \
|
|
|
|
in_text_unlikely_coal, \
|
|
|
|
".section __TEXT,__text_unlikely_coal," \
|
|
|
|
"coalesced,pure_instructions", 0) \
|
|
|
|
SECTION_FUNCTION (const_section, \
|
|
|
|
in_const, \
|
|
|
|
".const", 0) \
|
|
|
|
SECTION_FUNCTION (const_coal_section, \
|
|
|
|
in_const_coal, \
|
|
|
|
".section __TEXT,__const_coal,coalesced", 0) \
|
|
|
|
SECTION_FUNCTION (const_data_section, \
|
|
|
|
in_const_data, \
|
|
|
|
".const_data", 0) \
|
|
|
|
SECTION_FUNCTION (const_data_coal_section, \
|
|
|
|
in_const_data_coal, \
|
|
|
|
".section __DATA,__const_coal,coalesced", 0) \
|
|
|
|
SECTION_FUNCTION (data_coal_section, \
|
|
|
|
in_data_coal, \
|
|
|
|
".section __DATA,__datacoal_nt,coalesced", 0) \
|
|
|
|
SECTION_FUNCTION (cstring_section, \
|
|
|
|
in_cstring, \
|
|
|
|
".cstring", 0) \
|
|
|
|
SECTION_FUNCTION (literal4_section, \
|
|
|
|
in_literal4, \
|
|
|
|
".literal4", 0) \
|
|
|
|
SECTION_FUNCTION (literal8_section, \
|
|
|
|
in_literal8, \
|
|
|
|
".literal8", 0) \
|
|
|
|
SECTION_FUNCTION (constructor_section, \
|
|
|
|
in_constructor, \
|
|
|
|
".constructor", 0) \
|
|
|
|
SECTION_FUNCTION (mod_init_section, \
|
|
|
|
in_mod_init, \
|
|
|
|
".mod_init_func", 0) \
|
|
|
|
SECTION_FUNCTION (mod_term_section, \
|
|
|
|
in_mod_term, \
|
|
|
|
".mod_term_func", 0) \
|
|
|
|
SECTION_FUNCTION (destructor_section, \
|
|
|
|
in_destructor, \
|
|
|
|
".destructor", 0) \
|
|
|
|
SECTION_FUNCTION (objc_class_section, \
|
|
|
|
in_objc_class, \
|
|
|
|
".objc_class", 1) \
|
|
|
|
SECTION_FUNCTION (objc_meta_class_section, \
|
|
|
|
in_objc_meta_class, \
|
|
|
|
".objc_meta_class", 1) \
|
|
|
|
SECTION_FUNCTION (objc_category_section, \
|
|
|
|
in_objc_category, \
|
|
|
|
".objc_category", 1) \
|
|
|
|
SECTION_FUNCTION (objc_class_vars_section, \
|
|
|
|
in_objc_class_vars, \
|
|
|
|
".objc_class_vars", 1) \
|
|
|
|
SECTION_FUNCTION (objc_instance_vars_section, \
|
|
|
|
in_objc_instance_vars, \
|
|
|
|
".objc_instance_vars", 1) \
|
|
|
|
SECTION_FUNCTION (objc_cls_meth_section, \
|
|
|
|
in_objc_cls_meth, \
|
|
|
|
".objc_cls_meth", 1) \
|
|
|
|
SECTION_FUNCTION (objc_inst_meth_section, \
|
|
|
|
in_objc_inst_meth, \
|
|
|
|
".objc_inst_meth", 1) \
|
|
|
|
SECTION_FUNCTION (objc_cat_cls_meth_section, \
|
|
|
|
in_objc_cat_cls_meth, \
|
|
|
|
".objc_cat_cls_meth", 1) \
|
|
|
|
SECTION_FUNCTION (objc_cat_inst_meth_section, \
|
|
|
|
in_objc_cat_inst_meth, \
|
|
|
|
".objc_cat_inst_meth", 1) \
|
|
|
|
SECTION_FUNCTION (objc_selector_refs_section, \
|
|
|
|
in_objc_selector_refs, \
|
|
|
|
".objc_message_refs", 1) \
|
|
|
|
SECTION_FUNCTION (objc_selector_fixup_section, \
|
|
|
|
in_objc_selector_fixup, \
|
|
|
|
".section __OBJC, __sel_fixup, regular, no_dead_strip", 1) \
|
|
|
|
SECTION_FUNCTION (objc_symbols_section, \
|
|
|
|
in_objc_symbols, \
|
|
|
|
".objc_symbols", 1) \
|
|
|
|
SECTION_FUNCTION (objc_module_info_section, \
|
|
|
|
in_objc_module_info, \
|
|
|
|
".objc_module_info", 1) \
|
|
|
|
SECTION_FUNCTION (objc_protocol_section, \
|
|
|
|
in_objc_protocol, \
|
|
|
|
".objc_protocol", 1) \
|
|
|
|
SECTION_FUNCTION (objc_string_object_section, \
|
|
|
|
in_objc_string_object, \
|
|
|
|
".objc_string_object", 1) \
|
|
|
|
SECTION_FUNCTION (objc_constant_string_object_section, \
|
|
|
|
in_objc_constant_string_object, \
|
|
|
|
".section __OBJC, __cstring_object, regular, " \
|
|
|
|
"no_dead_strip", 1) \
|
|
|
|
/* Fix-and-Continue image marker. */ \
|
|
|
|
SECTION_FUNCTION (objc_image_info_section, \
|
|
|
|
in_objc_image_info, \
|
|
|
|
".section __OBJC, __image_info, regular, " \
|
|
|
|
"no_dead_strip", 1) \
|
|
|
|
SECTION_FUNCTION (objc_class_names_section, \
|
|
|
|
in_objc_class_names, \
|
|
|
|
".objc_class_names", 1) \
|
|
|
|
SECTION_FUNCTION (objc_meth_var_names_section, \
|
|
|
|
in_objc_meth_var_names, \
|
|
|
|
".objc_meth_var_names", 1) \
|
|
|
|
SECTION_FUNCTION (objc_meth_var_types_section, \
|
|
|
|
in_objc_meth_var_types, \
|
|
|
|
".objc_meth_var_types", 1) \
|
|
|
|
SECTION_FUNCTION (objc_cls_refs_section, \
|
|
|
|
in_objc_cls_refs, \
|
|
|
|
".objc_cls_refs", 1) \
|
|
|
|
\
|
|
|
|
SECTION_FUNCTION (machopic_lazy_symbol_ptr_section, \
|
|
|
|
in_machopic_lazy_symbol_ptr, \
|
|
|
|
".lazy_symbol_pointer", 0) \
|
|
|
|
SECTION_FUNCTION (machopic_nl_symbol_ptr_section, \
|
|
|
|
in_machopic_nl_symbol_ptr, \
|
|
|
|
".non_lazy_symbol_pointer", 0) \
|
|
|
|
SECTION_FUNCTION (machopic_symbol_stub_section, \
|
|
|
|
in_machopic_symbol_stub, \
|
|
|
|
".symbol_stub", 0) \
|
|
|
|
SECTION_FUNCTION (machopic_symbol_stub1_section, \
|
|
|
|
in_machopic_symbol_stub1, \
|
|
|
|
".section __TEXT,__symbol_stub1,symbol_stubs," \
|
|
|
|
"pure_instructions,16", 0) \
|
|
|
|
SECTION_FUNCTION (machopic_picsymbol_stub_section, \
|
|
|
|
in_machopic_picsymbol_stub, \
|
|
|
|
".picsymbol_stub", 0) \
|
|
|
|
SECTION_FUNCTION (machopic_picsymbol_stub1_section, \
|
|
|
|
in_machopic_picsymbol_stub1, \
|
|
|
|
".section __TEXT,__picsymbolstub1,symbol_stubs," \
|
|
|
|
"pure_instructions,32", 0) \
|
|
|
|
SECTION_FUNCTION (darwin_exception_section, \
|
|
|
|
in_darwin_exception, \
|
|
|
|
".section __DATA,__gcc_except_tab", 0) \
|
|
|
|
SECTION_FUNCTION (darwin_eh_frame_section, \
|
|
|
|
in_darwin_eh_frame, \
|
|
|
|
".section " EH_FRAME_SECTION_NAME ",__eh_frame" \
|
|
|
|
EH_FRAME_SECTION_ATTR, 0) \
|
|
|
|
\
|
2001-10-24 00:39:06 +02:00
|
|
|
static void \
|
2003-08-17 12:00:04 +02:00
|
|
|
objc_section_init (void) \
|
2001-04-12 04:13:00 +02:00
|
|
|
{ \
|
|
|
|
static int been_here = 0; \
|
|
|
|
\
|
|
|
|
if (been_here == 0) \
|
|
|
|
{ \
|
|
|
|
been_here = 1; \
|
|
|
|
/* written, cold -> hot */ \
|
|
|
|
objc_cat_cls_meth_section (); \
|
|
|
|
objc_cat_inst_meth_section (); \
|
|
|
|
objc_string_object_section (); \
|
|
|
|
objc_constant_string_object_section (); \
|
|
|
|
objc_selector_refs_section (); \
|
|
|
|
objc_selector_fixup_section (); \
|
|
|
|
objc_cls_refs_section (); \
|
|
|
|
objc_class_section (); \
|
|
|
|
objc_meta_class_section (); \
|
2003-08-17 12:00:04 +02:00
|
|
|
/* shared, hot -> cold */ \
|
2001-04-12 04:13:00 +02:00
|
|
|
objc_cls_meth_section (); \
|
|
|
|
objc_inst_meth_section (); \
|
|
|
|
objc_protocol_section (); \
|
|
|
|
objc_class_names_section (); \
|
|
|
|
objc_meth_var_types_section (); \
|
|
|
|
objc_meth_var_names_section (); \
|
|
|
|
objc_category_section (); \
|
|
|
|
objc_class_vars_section (); \
|
|
|
|
objc_instance_vars_section (); \
|
|
|
|
objc_module_info_section (); \
|
|
|
|
objc_symbols_section (); \
|
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define READONLY_DATA_SECTION const_section
|
|
|
|
|
hooks.c (hook_tree_bool_false): New.
* hooks.c (hook_tree_bool_false): New.
* hooks.h: Declare it.
* target-def.h (TARGET_ASM_SELECT_SECTION): New.
(TARGET_ASM_UNIQUE_SECTION, TARGET_IN_SMALL_DATA_P): New.
* target.h (select_section, unique_section): New.
(in_small_data_p): New.
* varasm.c (resolve_unique_section): Use hooks instead of macros.
(variable_section, output_constant_def_contents): Likewise.
(default_select_section, default_unique_section): New.
(categorize_decl_for_section, default_elf_select_section): New.
* output.h: Declare them.
* config/darwin.h (ALIAS_SECTION, try_section_alias): Remove.
(TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/darwin.c (machopic_select_section): ... here.
* config/darwin-protos.h: Update.
* config/nextstep.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/nextstep.c (nextstep_select_section): ... here.
* config/nextstep-protos.h: Update.
* config/elfos.h (UNIQUE_SECTION, SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/svr3.h (SELECT_SECTION): Remove.
* config/alpha/alpha.c (unicosmk_unique_section): Make static.
(TARGET_ASM_UNIQUE_SECTION) [UNICOS]: New.
(TARGET_IN_SMALL_DATA_P, alpha_in_small_data_p): New.
(alpha_encode_section_info): Use it.
* config/alpha/alpha-protos.h: Update.
* config/alpha/elf.h (DO_SELECT_SECTION): Remove.
(SELECT_SECTION, UNIQUE_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/alpha/unicosmk.h (UNIQUE_SECTION): Remove.
* config/arm/pe.h (UNIQUE_SECTION): Remove.
(TARGET_ASM_UNIQUE_SECTION): New.
* config/avr/avr.c (TARGET_ASM_UNIQUE_SECTION): New.
(avr_unique_section): Rename from unique_section; make static.
* config/avr/avr-protos.h: Update.
* config/avr/avr.h (UNIQUE_SECTION): Remove.
* config/c4x/c4x.h (SELECT_SECTION): Remove.
* config/i386/cygwin.h (UNIQUE_SECTION): Remove.
(TARGET_ASM_UNIQUE_SECTION): New.
* config/i386/i386-interix.h: Likewise.
* config/i386/win32.h: Likewise.
* config/i386/djgpp.h (UNIQUE_SECTION): Remove.
* config/i386/i386.c (ix86_asm_file_end): Use target hook not macro.
* config/i386/sco5.h (SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/i386/svr3gas.h (SELECT_SECTION): Remove.
* config/i860/paragon.h: Undef TARGET_ASM_SELECT_SECTION
instead of SELECT_SECTION.
* config/m68k/dpx2.h: Likewise.
* config/rs6000/lynx.h: Likewise.
* config/ia64/aix.h (SELECT_SECTION, UNIQUE_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New.
* config/ia64/ia64.c (TARGET_IN_SMALL_DATA_P): New.
(ia64_in_small_data_p): New.
(ia64_encode_section_info): Use it. Reorganize overlarge conditional.
(ia64_aix_select_section, ia64_aix_unique_section): New.
* config/ia64/sysv4.h (DO_SELECT_SECTION): Remove.
(SELECT_SECTION, UNIQUE_SECTION): Remove.
* config/m32r/m32r.h (SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/m32r/m32r.c (m32r_select_section): Take align argument.
* config/m32r/m32r-protos.h: Update.
* config/m88k/m88k.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/m88k/m88k.c (m88k_select_section): ... here.
* config/mcore/mcore-pe.h (SELECT_SECTION): Remove.
* config/mcore/mcore.h (UNIQUE_SECTION): Remove.
* config/mcore/mcore.c (TARGET_ASM_UNIQUE_SECTION): New.
(mcore_unique_section): Make static.
* config/mcore/mcore-protos.h: Update.
* config/mips/elf.h (UNIQUE_SECTION): Remove.
(TARGET_ASM_UNIQUE_SECTION): New.
* config/mips/elf64.h: Likewise.
* config/mips/iris6gld.h: Likewise.
* config/mips/linux.h: Likewise.
* config/mips/mips-protos.h: Update.
* config/mips/mips.c (mips_select_section): Add align argument.
* config/mips/mips.h (SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/mmix/mmix.h (SELECT_SECTION, UNIQUE_SECTION): Remove.
* config/mmix/mmix.c (mmix_select_section): Remove.
(mmix_unique_section): Remove.
* config/mmix/mmix-protos.h: Update.
* config/pa/pa.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/pa/pa.c (pa_select_section): ... here.
* config/pa/pa64-hpux.h (UNIQUE_SECTION): Remove.
* config/rs6000/rs6000.c (rs6000_elf_select_section): Rename
from rs6000_select_section and make static.
(rs6000_elf_unique_section): Similarly.
(rs6000_xcoff_select_section): From xcoff.h.
(rs6000_xcoff_unique_section): Likewise.
* config/rs6000/rs6000-protos.h: Update.
* config/rs6000/sysv4.h (SELECT_SECTION, UNIQUE_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New.
* config/rs6000/xcoff.h: Likewise.
* config/sparc/aout.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/sparc/sparc.c (sparc_aout_select_section): ... here.
* config/v850/v850.h (SELECT_SECTION): Move ...
* config/v850/v850.c (v850_select_section): ... here.
(TARGET_ASM_SELECT_SECTION): New.
* config/vax/vms.h (SELECT_SECTION): Move ...
* config/vax/vax.c (vms_select_section): ... here.
(TARGET_ASM_SELECT_SECTION): New.
* doc/tm.texi: Update SELECT_SECTION and UNIQUE_SECTION docs
for the target hooks.
From-SVN: r53550
2002-05-17 09:43:41 +02:00
|
|
|
#undef TARGET_ASM_SELECT_SECTION
|
|
|
|
#define TARGET_ASM_SELECT_SECTION machopic_select_section
|
2004-10-26 08:09:05 +02:00
|
|
|
#define USE_SELECT_SECTION_FOR_FUNCTIONS
|
|
|
|
|
system.h (SELECT_RTX_SECTION): Poison.
* system.h (SELECT_RTX_SECTION): Poison.
* target-def.h (TARGET_ASM_SELECT_RTX_SECTION): New.
* target.h (select_rtx_section): New.
* varasm.c (output_constant_pool): Use it.
(default_select_rtx_section, default_elf_select_rtx_section): New.
* output.h: Declare them.
* config/darwin.h (SELECT_RTX_SECTION): Move ...
* config/darwin.c (machopic_select_rtx_section): ... here.
* config/darwin-protos.h: Update.
* config/nextstep.h (SELECT_RTX_SECTION): Move ...
* config/nextstep.c (machopic_select_rtx_section): ... here.
(nextstep_select_section): Rename variable to avoid macro clash.
* config/nextstep-protos.h: Update.
* config/elfos.h, config/svr3.h, config/arm/aof.h, config/c4x/c4x.h,
config/i386/dgux.h, config/i386/osfrose.h, config/i386/sco5.h,
config/i386/svr3gas.h, config/i860/paragon.h, config/ia64/aix.h,
config/m32r/m32r.h, config/m68k/dpx2.h, config/m68k/lynx.h,
config/m68k/m68k.h, config/m68k/tower-as.h, config/m88k/dgux.h,
config/mcore/mcore-pe.h, config/mips/mips.h, config/mmix/mmix.h,
config/pa/pa-linux.h, config/pa/pa.h, config/romp/romp.h,
config/rs6000/lynx.h, config/rs6000/sysv4.h, config/s390/linux.h,
config/sparc/sysv4.h, config/xtensa/elf.h, config/xtensa/linux.h
(SELECT_RTX_SECTION): Remove.
* config/darwin.h, config/elfos.h, config/nextstep.h,
config/ia64/aix.h, config/ia64/sysv4.h, config/alpha/alpha.c,
config/mips/mips.c, config/romp/romp.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/s390/s390.c, config/sparc/aout.h,
config/sparc/lynx.h, config/xtensa/xtensa.c
(TARGET_ASM_SELECT_RTX_SECTION): New.
* config/alpha/elf.h (SELECT_RTX_SECTION): Move ...
* config/alpha/alpha.c (alpha_elf_select_rtx_section): ... here.
* config/ia64/sysv4.h (SELECT_RTX_SECTION): Move ...
* config/ia64/ia64.c (ia64_select_rtx_section): ... here.
(ia64_aix_select_rtx_section): New.
* config/mips/iris6.h (READONLY_DATA_SECTION_ASM_OP): Undef before
redefining.
* config/mips/mips.c (mips_select_rtx_section): Make static.
Support ELF SHF_MERGE features.
* config/mips/mips-protos.h: Update.
* config/rs6000/xcoff.h (SELECT_RTX_SECTION): Move ...
* config/rs6000/rs6000.c (rs6000_xcoff_select_rtx_section): ... here.
(rs6000_elf_select_rtx_section): Rename from rs6000_select_rtx_section;
make static, fall back to default_elf_select_rtx_section.
* config/rs6000/rs6000-protos.h: Update.
* config/sparc/sparc.h (SELECT_RTX_SECTION): Move ...
* config/sparc/sparc.c (sparc_aout_select_rtx_section): ... here.
* config/sparc/sunos4.h (on_exit): Declare only if IN_LIBGCC2.
* config/romp/romp.c (romp_select_rtx_section): New.
* config/s390/s390.c (s390_select_rtx_section): New.
* config/xtensa/xtensa.c: Include output.h. Shuffle local function
declarations before target macro definition.
(xtensa_emit_call): Use static buffer.
(xtensa_select_rtx_section): New.
* config/xtensa/xtensa.h (MAX_INT_TYPE_SIZE): Remove.
(IMPLICIT_FIX_EXPR, EASY_DIV_EXPR): Remove.
(ASM_OUTPUT_POOL_PROLOGUE): Update call to resolve_unique_section.
* doc/tm.texi (TARGET_ASM_SELECT_RTX_SECTION): Update from
SELECT_RTX_SECTION docs.
From-SVN: r53600
2002-05-19 01:47:22 +02:00
|
|
|
#undef TARGET_ASM_SELECT_RTX_SECTION
|
|
|
|
#define TARGET_ASM_SELECT_RTX_SECTION machopic_select_rtx_section
|
2004-03-12 18:09:03 +01:00
|
|
|
#undef TARGET_ASM_UNIQUE_SECTION
|
|
|
|
#define TARGET_ASM_UNIQUE_SECTION darwin_unique_section
|
2004-08-12 15:57:04 +02:00
|
|
|
#undef TARGET_ASM_FUNCTION_RODATA_SECTION
|
|
|
|
#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section
|
2004-03-12 18:09:03 +01:00
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2001-04-29 02:12:51 +02:00
|
|
|
#define ASM_DECLARE_UNRESOLVED_REFERENCE(FILE,NAME) \
|
2003-08-17 12:00:04 +02:00
|
|
|
do { \
|
2001-04-29 02:12:51 +02:00
|
|
|
if (FILE) { \
|
2003-03-11 02:41:11 +01:00
|
|
|
if (MACHOPIC_INDIRECT) \
|
2001-04-29 02:12:51 +02:00
|
|
|
fprintf (FILE, "\t.lazy_reference "); \
|
2001-04-12 04:13:00 +02:00
|
|
|
else \
|
2001-04-29 02:12:51 +02:00
|
|
|
fprintf (FILE, "\t.reference "); \
|
|
|
|
assemble_name (FILE, NAME); \
|
|
|
|
fprintf (FILE, "\n"); \
|
2001-04-12 04:13:00 +02:00
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
2001-06-28 03:34:25 +02:00
|
|
|
#define ASM_DECLARE_CLASS_REFERENCE(FILE,NAME) \
|
|
|
|
do { \
|
|
|
|
if (FILE) { \
|
|
|
|
fprintf (FILE, "\t"); \
|
2003-08-17 12:00:04 +02:00
|
|
|
assemble_name (FILE, NAME); \
|
2001-06-28 03:34:25 +02:00
|
|
|
fprintf (FILE, "=0\n"); \
|
2002-08-21 04:41:51 +02:00
|
|
|
(*targetm.asm_out.globalize_label) (FILE, NAME); \
|
2001-04-12 04:13:00 +02:00
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
2002-08-21 04:41:51 +02:00
|
|
|
/* Globalizing directive for a label. */
|
|
|
|
#define GLOBAL_ASM_OP ".globl "
|
|
|
|
#define TARGET_ASM_GLOBALIZE_LABEL darwin_globalize_label
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2003-11-11 00:07:09 +01:00
|
|
|
/* Emit an assembler directive to set visibility for a symbol. Used
|
|
|
|
to support visibility attribute and Darwin's private extern
|
darwin.c, [...]: Fix comment formatting.
* config/darwin.c, config/darwin.h, config/freebsd-spec.h,
config/arm/arm.c, config/arm/arm.md,
config/cris/cris-protos.h, config/fr30/fr30.c,
config/fr30/fr30.h, config/h8300/h8300.c, config/i386/i386.h,
config/i860/i860.c, config/i860/i860.h, config/ia64/ia64-c.c,
config/ia64/ia64.c, config/ia64/ia64.h, config/ip2k/ip2k.h,
config/ip2k/ip2k.md, config/ip2k/libgcc.S,
config/m32r/linux.h, config/m32r/m32r.c, config/m32r/m32r.h,
config/m68k/m68k.c, config/m68k/netbsd-elf.h,
config/mips/mips.c, config/mmix/mmix.c, config/mmix/mmix.md,
config/ns32k/netbsd.h, config/ns32k/ns32k.c,
config/ns32k/ns32k.h, config/pdp11/pdp11.h,
config/rs6000/darwin-ldouble.c, config/s390/s390.h,
config/s390/s390.md, config/sparc/netbsd-elf.h,
config/sparc/openbsd.h, config/sparc/sparc.c,
config/xtensa/lib2funcs.S: Fix comment formatting.
From-SVN: r77268
2004-02-04 21:01:05 +01:00
|
|
|
feature. */
|
2003-11-11 00:07:09 +01:00
|
|
|
#undef TARGET_ASM_ASSEMBLE_VISIBILITY
|
|
|
|
#define TARGET_ASM_ASSEMBLE_VISIBILITY darwin_assemble_visibility
|
|
|
|
|
2004-10-28 01:02:39 +02:00
|
|
|
/* Extra attributes for Darwin. */
|
|
|
|
#define SUBTARGET_ATTRIBUTE_TABLE \
|
|
|
|
/* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */ \
|
|
|
|
{ "weak_import", 0, 0, true, false, false, \
|
|
|
|
darwin_handle_weak_import_attribute }
|
2003-11-11 00:07:09 +01:00
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
#undef ASM_GENERATE_INTERNAL_LABEL
|
|
|
|
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
|
2001-10-24 00:39:06 +02:00
|
|
|
sprintf (LABEL, "*%s%ld", PREFIX, (long)(NUM))
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2004-08-16 22:54:43 +02:00
|
|
|
#undef TARGET_ASM_MARK_DECL_PRESERVED
|
|
|
|
#define TARGET_ASM_MARK_DECL_PRESERVED darwin_mark_decl_preserved
|
|
|
|
|
2004-07-23 06:35:17 +02:00
|
|
|
/* Set on a symbol with SYMBOL_FLAG_FUNCTION or
|
|
|
|
MACHO_SYMBOL_FLAG_VARIABLE to indicate that the function or
|
|
|
|
variable has been defined in this translation unit. */
|
2004-08-19 02:43:03 +02:00
|
|
|
|
2004-07-23 06:35:17 +02:00
|
|
|
#define MACHO_SYMBOL_FLAG_VARIABLE (SYMBOL_FLAG_MACH_DEP)
|
|
|
|
#define MACHO_SYMBOL_FLAG_DEFINED ((SYMBOL_FLAG_MACH_DEP) << 1)
|
|
|
|
|
2004-08-19 02:43:03 +02:00
|
|
|
/* Set on a symbol to indicate when fix-and-continue style code
|
|
|
|
generation is being used and the symbol refers to a static symbol
|
|
|
|
that should be rebound from new instances of a translation unit to
|
|
|
|
the original instance of the data. */
|
|
|
|
|
|
|
|
#define MACHO_SYMBOL_STATIC ((SYMBOL_FLAG_MACH_DEP) << 2)
|
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
/* Symbolic names for various things we might know about a symbol. */
|
|
|
|
|
|
|
|
enum machopic_addr_class {
|
|
|
|
MACHOPIC_UNDEFINED,
|
|
|
|
MACHOPIC_DEFINED_DATA,
|
|
|
|
MACHOPIC_UNDEFINED_DATA,
|
|
|
|
MACHOPIC_DEFINED_FUNCTION,
|
|
|
|
MACHOPIC_UNDEFINED_FUNCTION
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Macros defining the various PIC cases. */
|
|
|
|
|
2003-03-11 02:41:11 +01:00
|
|
|
#define MACHO_DYNAMIC_NO_PIC_P (TARGET_DYNAMIC_NO_PIC)
|
|
|
|
#define MACHOPIC_INDIRECT (flag_pic || MACHO_DYNAMIC_NO_PIC_P)
|
|
|
|
#define MACHOPIC_JUST_INDIRECT (flag_pic == 1 || MACHO_DYNAMIC_NO_PIC_P)
|
|
|
|
#define MACHOPIC_PURE (flag_pic == 2 && ! MACHO_DYNAMIC_NO_PIC_P)
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2002-08-01 01:18:44 +02:00
|
|
|
#undef TARGET_ENCODE_SECTION_INFO
|
system.h (ENCODE_SECTION_INFO): Poison it.
* system.h (ENCODE_SECTION_INFO): Poison it.
* target-def.h (TARGET_ENCODE_SECTION_INFO): New.
* target.h (encode_section_info): New.
* varasm.c (make_decl_rtl, output_constant_def): Use it.
* hooks.c (hook_tree_int_void): New.
* hooks.h: Declare it.
* config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h,
config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h,
config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h,
config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h,
config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c,
config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h,
config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c,
config/mmix/mmix.h, config/rs6000/rs6000-protos.h,
config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h,
config/stormy16/stormy16.c, config/stormy16/stormy16.h:
Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO
referencing existing function. Make function static.
* config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c,
config/arc/arc.h, config/arm/arm.c, config/arm/arm.h,
config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c,
config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c,
config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c,
config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h,
config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c,
config/pa/pa.h, config/romp/romp.c, config/romp/romp.h,
config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c,
config/s390/s390.h, config/sh/sh.c, config/sh/sh.h,
config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c,
config/v850/v850.h, config/vax/vax.c, config/vax/vms.h,
config/xtensa/xtensa.c, config/xtensa/xtensa.h:
Move ENCODE_SECTION_INFO to out-of-line function and add
TARGET_ENCODE_SECTION_INFO.
* config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro.
(ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise.
* config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename
from SUBTARGET_*
(switch_to_section): Replace in_rdata case with in_readonly_data.
* config/h8300/h8300.c (h8300_encode_label): Make static.
* config/h8300/h8300-protos.h: Update.
* config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename
from rs6000_encode_section_info; make static.
(rs6000_xcoff_encode_section_info): New.
* config/v850/v850.c (v850_encode_data_area): Make static.
* config/v850/v850-protos.h: Update.
* config/vax/vax.c: Include flags.h.
(vms_select_section): Fix typo.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous
ENCODE_SECTION_INFO docs.
From-SVN: r53606
2002-05-19 07:23:27 +02:00
|
|
|
#define TARGET_ENCODE_SECTION_INFO darwin_encode_section_info
|
2002-08-01 01:18:44 +02:00
|
|
|
#undef TARGET_STRIP_NAME_ENCODING
|
2004-07-23 06:35:17 +02:00
|
|
|
#define TARGET_STRIP_NAME_ENCODING default_strip_name_encoding
|
2001-06-08 04:28:04 +02:00
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
#define GEN_BINDER_NAME_FOR_STUB(BUF,STUB,STUB_LENGTH) \
|
|
|
|
do { \
|
c-parse.in (yyerror): Const-ification and/or static-ization.
* c-parse.in (yyerror): Const-ification and/or static-ization.
* c-typeck.c (push_member_name): Likewise.
* collect2.c (main): Likewise.
* dbxout.c (dbxout_parms): Likewise.
* diagnostic.c (format_with_decl): Likewise.
* dwarf2out.c (output_ranges): Likewise.
* dwarfout.c (fundamental_type_code): Likewise.
* except.c (dw2_output_call_site_table): Likewise.
* gcc.c (do_spec_1): Likewise.
* genopinit.c (optabs): Likewise.
* objc/objc-act.c (synth_id_with_class_suffix, start_class,
gen_declaration_1, handle_impent): Likewise.
* protoize.c (default_include, in_system_include_dir, abspath):
Likewise.
* sched-vis.c (visualize_stall_cycles): Likewise.
* sdbout.c (plain_type_1, sdbout_end_function,
sdbout_end_epilogue): Likewise.
* varasm.c (decode_reg_name): Likewise.
* 1750a.c (mod_regno_adjust): Likewise.
* alpha.c (alpha_write_one_linkage,
unicosmk_output_default_externs): Likewise.
* arm.c (arm_condition_codes): Likewise.
* arm.h (arm_condition_codes): Likewise.
* avr.c (output_movsisf, encode_section_info): Likewise.
* darwin.h (GEN_BINDER_NAME_FOR_STUB, GEN_SYMBOL_NAME_FOR_SYMBOL):
Likewise.
* i386.c (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise.
* i386.h (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise.
* m88k.c (output_function_profiler): Likewise.
* mips.c (mips_output_conditional_branch): Likewise.
* ns32k.c (ns32k_out_reg_names): Likewise.
* ns32k.h (ns32k_out_reg_names): Likewise.
* pj.c (pj_output_rval): Likewise.
* rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Likewise.
* sparc.c (sparc_flat_function_prologue,
sparc_flat_function_epilogue): Likewise.
cp:
* decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
Const-ification.
* pt.c (tsubst_decl): Likewise.
f:
* bad.c (ffebad_finish): Const-ification and/or static-ization.
* intrin.c (ffeintrin_cmp_name_): Likewise.
* stc.c (ffestc_R904): Likewise.
java:
* expr.c (expand_invoke): Const-ification.
* parse.y (patch_method_invocation): Likewise.
From-SVN: r45581
2001-09-13 16:37:29 +02:00
|
|
|
const char *const stub_ = (STUB); \
|
2001-04-12 04:13:00 +02:00
|
|
|
char *buffer_ = (BUF); \
|
|
|
|
strcpy (buffer_, stub_); \
|
|
|
|
if (stub_[0] == '"') \
|
|
|
|
{ \
|
|
|
|
strcpy (buffer_ + (STUB_LENGTH) - 1, "_binder\""); \
|
|
|
|
} \
|
|
|
|
else \
|
|
|
|
{ \
|
|
|
|
strcpy (buffer_ + (STUB_LENGTH), "_binder"); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
#define GEN_SYMBOL_NAME_FOR_SYMBOL(BUF,SYMBOL,SYMBOL_LENGTH) \
|
|
|
|
do { \
|
c-parse.in (yyerror): Const-ification and/or static-ization.
* c-parse.in (yyerror): Const-ification and/or static-ization.
* c-typeck.c (push_member_name): Likewise.
* collect2.c (main): Likewise.
* dbxout.c (dbxout_parms): Likewise.
* diagnostic.c (format_with_decl): Likewise.
* dwarf2out.c (output_ranges): Likewise.
* dwarfout.c (fundamental_type_code): Likewise.
* except.c (dw2_output_call_site_table): Likewise.
* gcc.c (do_spec_1): Likewise.
* genopinit.c (optabs): Likewise.
* objc/objc-act.c (synth_id_with_class_suffix, start_class,
gen_declaration_1, handle_impent): Likewise.
* protoize.c (default_include, in_system_include_dir, abspath):
Likewise.
* sched-vis.c (visualize_stall_cycles): Likewise.
* sdbout.c (plain_type_1, sdbout_end_function,
sdbout_end_epilogue): Likewise.
* varasm.c (decode_reg_name): Likewise.
* 1750a.c (mod_regno_adjust): Likewise.
* alpha.c (alpha_write_one_linkage,
unicosmk_output_default_externs): Likewise.
* arm.c (arm_condition_codes): Likewise.
* arm.h (arm_condition_codes): Likewise.
* avr.c (output_movsisf, encode_section_info): Likewise.
* darwin.h (GEN_BINDER_NAME_FOR_STUB, GEN_SYMBOL_NAME_FOR_SYMBOL):
Likewise.
* i386.c (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise.
* i386.h (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise.
* m88k.c (output_function_profiler): Likewise.
* mips.c (mips_output_conditional_branch): Likewise.
* ns32k.c (ns32k_out_reg_names): Likewise.
* ns32k.h (ns32k_out_reg_names): Likewise.
* pj.c (pj_output_rval): Likewise.
* rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Likewise.
* sparc.c (sparc_flat_function_prologue,
sparc_flat_function_epilogue): Likewise.
cp:
* decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
Const-ification.
* pt.c (tsubst_decl): Likewise.
f:
* bad.c (ffebad_finish): Const-ification and/or static-ization.
* intrin.c (ffeintrin_cmp_name_): Likewise.
* stc.c (ffestc_R904): Likewise.
java:
* expr.c (expand_invoke): Const-ification.
* parse.y (patch_method_invocation): Likewise.
From-SVN: r45581
2001-09-13 16:37:29 +02:00
|
|
|
const char *const symbol_ = (SYMBOL); \
|
2001-04-12 04:13:00 +02:00
|
|
|
char *buffer_ = (BUF); \
|
|
|
|
if (name_needs_quotes (symbol_) && symbol_[0] != '"') \
|
|
|
|
{ \
|
|
|
|
sprintf (buffer_, "\"%s\"", symbol_); \
|
|
|
|
} \
|
|
|
|
else \
|
|
|
|
{ \
|
|
|
|
strcpy (buffer_, symbol_); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
/* Given a symbol name string, create the lazy pointer version
|
|
|
|
of the symbol name. */
|
|
|
|
|
|
|
|
#define GEN_LAZY_PTR_NAME_FOR_SYMBOL(BUF,SYMBOL,SYMBOL_LENGTH) \
|
|
|
|
do { \
|
2004-07-23 06:35:17 +02:00
|
|
|
const char *symbol_ = (SYMBOL); \
|
2001-04-12 04:13:00 +02:00
|
|
|
char *buffer_ = (BUF); \
|
|
|
|
if (symbol_[0] == '"') \
|
|
|
|
{ \
|
system.h (STRIP_NAME_ENCODING): Poison it.
* system.h (STRIP_NAME_ENCODING): Poison it.
* output.h (STRIP_NAME_ENCODING): Remove.
(default_strip_name_encoding): Declare.
* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
* target.h (strip_name_encoding): New.
* varasm.c (default_strip_name_encoding): New.
* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
config/v850/v850.h: Use the hook, not the macro.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
config/v850/v850.c, config/v850/v850.h:
Move STRIP_NAME_ENCODING to out-of-line function and add
TARGET_STRIP_NAME_ENCODING.
* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
with TARGET_STRIP_NAME_ENCODING referencing existing function;
make function static.
* xcoffout.c: Include target.h
* Makefile.in (xcoffout.o): Update.
* config/avr/avr.c (avr_encode_section_info): Correct prototype.
* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
reloc argument unused.
* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.
* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
STRIP_NAME_ENCODING docs.
From-SVN: r53615
2002-05-19 09:55:48 +02:00
|
|
|
strcpy (buffer_, "\"L"); \
|
2001-04-12 04:13:00 +02:00
|
|
|
strcpy (buffer_ + 2, symbol_ + 1); \
|
|
|
|
strcpy (buffer_ + (SYMBOL_LENGTH), "$lazy_ptr\""); \
|
|
|
|
} \
|
|
|
|
else if (name_needs_quotes (symbol_)) \
|
|
|
|
{ \
|
|
|
|
strcpy (buffer_, "\"L"); \
|
|
|
|
strcpy (buffer_ + 2, symbol_); \
|
|
|
|
strcpy (buffer_ + (SYMBOL_LENGTH) + 2, "$lazy_ptr\""); \
|
|
|
|
} \
|
|
|
|
else \
|
|
|
|
{ \
|
|
|
|
strcpy (buffer_, "L"); \
|
|
|
|
strcpy (buffer_ + 1, symbol_); \
|
|
|
|
strcpy (buffer_ + (SYMBOL_LENGTH) + 1, "$lazy_ptr"); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
2001-10-22 16:43:31 +02:00
|
|
|
#define TARGET_ASM_EXCEPTION_SECTION darwin_exception_section
|
2001-10-17 01:22:27 +02:00
|
|
|
|
2001-10-22 16:43:31 +02:00
|
|
|
#define TARGET_ASM_EH_FRAME_SECTION darwin_eh_frame_section
|
2003-08-17 12:00:04 +02:00
|
|
|
|
2004-03-12 18:09:03 +01:00
|
|
|
#define EH_FRAME_SECTION_NAME "__TEXT"
|
2004-08-18 20:41:01 +02:00
|
|
|
#define EH_FRAME_SECTION_ATTR ",coalesced,no_toc+strip_static_syms+live_support"
|
2004-03-12 18:09:03 +01:00
|
|
|
|
2004-10-26 08:09:05 +02:00
|
|
|
/* Java runtime class list. */
|
|
|
|
#define JCR_SECTION_NAME "__DATA,jcr,regular,no_dead_strip"
|
|
|
|
|
2002-08-01 01:18:44 +02:00
|
|
|
#undef ASM_PREFERRED_EH_DATA_FORMAT
|
2001-10-17 01:22:27 +02:00
|
|
|
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
|
2002-09-13 05:44:54 +02:00
|
|
|
(((CODE) == 2 && (GLOBAL) == 1) \
|
2005-01-05 19:39:43 +01:00
|
|
|
? (DW_EH_PE_pcrel | DW_EH_PE_indirect | DW_EH_PE_sdata4) : \
|
2002-09-13 05:44:54 +02:00
|
|
|
((CODE) == 1 || (GLOBAL) == 0) ? DW_EH_PE_pcrel : DW_EH_PE_absptr)
|
|
|
|
|
|
|
|
#define ASM_OUTPUT_DWARF_DELTA(FILE,SIZE,LABEL1,LABEL2) \
|
|
|
|
darwin_asm_output_dwarf_delta (FILE, SIZE, LABEL1, LABEL2)
|
|
|
|
|
2004-03-12 18:09:03 +01:00
|
|
|
#define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(ASM_OUT_FILE, ENCODING, SIZE, ADDR, DONE) \
|
|
|
|
if (ENCODING == ASM_PREFERRED_EH_DATA_FORMAT (2, 1)) { \
|
|
|
|
darwin_non_lazy_pcrel (ASM_OUT_FILE, ADDR); \
|
|
|
|
goto DONE; \
|
|
|
|
}
|
|
|
|
|
2004-11-23 02:17:55 +01:00
|
|
|
/* Experimentally, putting jump tables in text is faster on SPEC.
|
|
|
|
Also this is needed for correctness for coalesced functions. */
|
|
|
|
|
|
|
|
#ifndef JUMP_TABLES_IN_TEXT_SECTION
|
2004-11-22 07:46:04 +01:00
|
|
|
#define JUMP_TABLES_IN_TEXT_SECTION 1
|
2004-11-23 02:17:55 +01:00
|
|
|
#endif
|
2004-03-12 18:09:03 +01:00
|
|
|
|
2002-09-13 05:44:54 +02:00
|
|
|
#define TARGET_TERMINATE_DW2_EH_FRAME_INFO false
|
2001-10-17 01:22:27 +02:00
|
|
|
|
2004-03-12 18:09:03 +01:00
|
|
|
#undef TARGET_ASM_NAMED_SECTION
|
|
|
|
#define TARGET_ASM_NAMED_SECTION darwin_asm_named_section
|
|
|
|
|
2003-01-01 13:27:02 +01:00
|
|
|
#define DARWIN_REGISTER_TARGET_PRAGMAS() \
|
|
|
|
do { \
|
|
|
|
c_register_pragma (0, "mark", darwin_pragma_ignore); \
|
|
|
|
c_register_pragma (0, "options", darwin_pragma_options); \
|
|
|
|
c_register_pragma (0, "segment", darwin_pragma_ignore); \
|
|
|
|
c_register_pragma (0, "unused", darwin_pragma_unused); \
|
2001-06-28 21:55:53 +02:00
|
|
|
} while (0)
|
2002-07-17 02:19:30 +02:00
|
|
|
|
|
|
|
#undef ASM_APP_ON
|
|
|
|
#define ASM_APP_ON ""
|
|
|
|
#undef ASM_APP_OFF
|
|
|
|
#define ASM_APP_OFF ""
|
2004-02-13 02:58:37 +01:00
|
|
|
|
2004-09-16 08:49:59 +02:00
|
|
|
void darwin_register_frameworks (const char *, const char *, int);
|
|
|
|
void darwin_register_objc_includes (const char *, const char *, int);
|
|
|
|
#define TARGET_EXTRA_PRE_INCLUDES darwin_register_objc_includes
|
Add framework support for darwin.
* c-incpath.c: Include target.h and machmode.h.
(add_path): Use a consistent style for cpp_dir. Initialize
p->construct to 0.
(add_cpp_dir_path): New.
(register_include_chains): Add use of extra_includes callback.
(hook_void_int): Add.
(target_c_incpath): Add.
* c-incpath.h (add_cpp_dir_path): New.
(target_c_incpath_s): Add.
(target_c_incpath): Add.
(C_INCPATH_INIT): Add.
* c-opts.c (c_common_missing_argument,
c_common_handle_option): Add -F argument processing.
* c.opt: Add -F argument processing.
* gcc.c (trad_capable_cpp): Add -F argument processing.
* cppfiles.c (find_file_in_dir): Update to use construct
callback.
(search_path_exhausted, cpp_get_path, cpp_get_buffer,
cpp_get_prev): New.
(_cpp_find_file): Use search_path_exhausted.
(make_cpp_dir): Initialize construct to 0.
* cpplib.h (missing_header_cb
cpp_get_path, cpp_get_buffer, cpp_get_file, cpp_get_prev): New.
(cpp_callbacks): Add missing_header
(cpp_dir): Add construct.
* target-def.h: (TARGET_OPTF): New.
* hooks.c (hook_void_int, hook_void_charptr): Add.
* hooks.h (hook_void_int, hook_void_charptr): Add.
* Makefile.in (c-incpath.o) : Add $(TARGET_H) and
$(MACHMODE_H) dependencies.
* doc/invoke.texi (Darwin Options): Document -F.
* doc/tm.texi (TARGET_EXTRA_INCLUDES): Add.
(TARGET_OPTF): Add.
* fix-header.c (target_c_incpath): Add.
* config/darwin-c.c: Add c-incpath.h include.
(using_frameworks, find_subframework_file,
find_subframework_header, add_system_framework_path,
frameworks_in_use, num_frameworks, max_frameworks,
add_framework, find_framework, struct framework_header,
framework_header_dirs, framework_construct_pathname,
find_subframework_file, add_system_framework_path,
add_framework_path, framework_defaults,
darwin_register_frameworks, find_subframework_header): Add.
* config/darwin.h (TARGET_EXTRA_INCLUDES, TARGET_OPTF): New.
(TARGET_OPTION_TRANSLATE_TABLE): Add -framework support.
(CPP_SPEC): Add __APPLE_CC__ support.
* t-darwin (darwin-c.o): Add c-incpath.h dependency.
From-SVN: r78875
2004-03-04 01:18:54 +01:00
|
|
|
#define TARGET_EXTRA_INCLUDES darwin_register_frameworks
|
|
|
|
|
|
|
|
void add_framework_path (char *);
|
|
|
|
#define TARGET_OPTF add_framework_path
|
|
|
|
|
2005-07-13 18:28:25 +02:00
|
|
|
#define TARGET_POSIX_IO
|
2004-02-24 20:53:33 +01:00
|
|
|
|
2005-07-08 07:51:06 +02:00
|
|
|
/* All new versions of Darwin have C99 functions. */
|
2005-07-09 02:42:42 +02:00
|
|
|
#define TARGET_C99_FUNCTIONS 1
|
2004-04-23 19:56:08 +02:00
|
|
|
|
2004-07-14 23:08:06 +02:00
|
|
|
#define WINT_TYPE "int"
|
|
|
|
|
2004-02-13 02:58:37 +01:00
|
|
|
#endif /* CONFIG_DARWIN_H */
|