aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2007-02-03 04:52:51 +0000
committerMike Stump <mrs@gcc.gnu.org>2007-02-03 04:52:51 +0000
commit75b1b789dd6b3d3ad5c950a4911d49ed29a9cec4 (patch)
tree54c17e9fc5a50d361ede340d400a56a854c64726 /gcc/config
parentda1f39e475bf2433e2ce1277c1015ad4ab3291e3 (diff)
downloadgcc-75b1b789dd6b3d3ad5c950a4911d49ed29a9cec4.zip
gcc-75b1b789dd6b3d3ad5c950a4911d49ed29a9cec4.tar.gz
gcc-75b1b789dd6b3d3ad5c950a4911d49ed29a9cec4.tar.bz2
darwin9.h (DARWIN_LINKER_GENERATES_ISLANDS): Add.
* config/darwin9.h (DARWIN_LINKER_GENERATES_ISLANDS): Add. * config/rs6000/rs6000.c (DARWIN_GENERATE_ISLANDS): Add. (output_call): Use DARWIN_GENERATE_ISLANDS to decide when to generate a branch island. Radar 4967371 From-SVN: r121534
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/darwin9.h3
-rw-r--r--gcc/config/rs6000/rs6000.c12
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/config/darwin9.h b/gcc/config/darwin9.h
index 3f62677..7431cfb 100644
--- a/gcc/config/darwin9.h
+++ b/gcc/config/darwin9.h
@@ -17,3 +17,6 @@
%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
%{.c|.cc|.C|.cpp|.c++|.CPP|.m|.mm: \
%{g*:%{!gstabs*:%{!g0: dsymutil %{o*:%*}%{!o:a.out}}}}}}}}}}}}"
+
+/* The linker can generate branch islands. */
+#define DARWIN_LINKER_GENERATES_ISLANDS 1
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 8624c90..18c00e0 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -797,7 +797,6 @@ static int rs6000_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
static const char *invalid_arg_for_unprototyped_fn (tree, tree, tree);
#if TARGET_MACHO
static void macho_branch_islands (void);
-static void add_compiler_branch_island (tree, tree, int);
static int no_previous_def (tree function_name);
static tree get_prev_label (tree function_name);
static void rs6000_darwin_file_start (void);
@@ -19076,6 +19075,14 @@ get_prev_label (tree function_name)
return 0;
}
+#ifndef DARWIN_LINKER_GENERATES_ISLANDS
+#define DARWIN_LINKER_GENERATES_ISLANDS 0
+#endif
+
+/* KEXTs still need branch islands. */
+#define DARWIN_GENERATE_ISLANDS (!DARWIN_LINKER_GENERATES_ISLANDS \
+ || flag_mkernel || flag_apple_kext)
+
/* INSN is either a function call or a millicode call. It may have an
unconditional jump in its delay slot.
@@ -19086,7 +19093,8 @@ output_call (rtx insn, rtx *operands, int dest_operand_number,
int cookie_operand_number)
{
static char buf[256];
- if (GET_CODE (operands[dest_operand_number]) == SYMBOL_REF
+ if (DARWIN_GENERATE_ISLANDS
+ && GET_CODE (operands[dest_operand_number]) == SYMBOL_REF
&& (INTVAL (operands[cookie_operand_number]) & CALL_LONG))
{
tree labelname;