Commit 75b1b789 by Mike Stump Committed by Mike Stump

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
parent da1f39e4
2007-02-02 Mike Stump <mrs@apple.com>
* 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.
2007-02-02 Bob Wilson <bob.wilson@acm.org> 2007-02-02 Bob Wilson <bob.wilson@acm.org>
* config/xtensa/xtensa.c (smalloffset_mem_p): Use BASE_REG_P. * config/xtensa/xtensa.c (smalloffset_mem_p): Use BASE_REG_P.
......
...@@ -17,3 +17,6 @@ ...@@ -17,3 +17,6 @@
%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\ %{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
%{.c|.cc|.C|.cpp|.c++|.CPP|.m|.mm: \ %{.c|.cc|.C|.cpp|.c++|.CPP|.m|.mm: \
%{g*:%{!gstabs*:%{!g0: dsymutil %{o*:%*}%{!o:a.out}}}}}}}}}}}}" %{g*:%{!gstabs*:%{!g0: dsymutil %{o*:%*}%{!o:a.out}}}}}}}}}}}}"
/* The linker can generate branch islands. */
#define DARWIN_LINKER_GENERATES_ISLANDS 1
...@@ -797,7 +797,6 @@ static int rs6000_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode, ...@@ -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); static const char *invalid_arg_for_unprototyped_fn (tree, tree, tree);
#if TARGET_MACHO #if TARGET_MACHO
static void macho_branch_islands (void); static void macho_branch_islands (void);
static void add_compiler_branch_island (tree, tree, int);
static int no_previous_def (tree function_name); static int no_previous_def (tree function_name);
static tree get_prev_label (tree function_name); static tree get_prev_label (tree function_name);
static void rs6000_darwin_file_start (void); static void rs6000_darwin_file_start (void);
...@@ -19076,6 +19075,14 @@ get_prev_label (tree function_name) ...@@ -19076,6 +19075,14 @@ get_prev_label (tree function_name)
return 0; 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 /* INSN is either a function call or a millicode call. It may have an
unconditional jump in its delay slot. unconditional jump in its delay slot.
...@@ -19086,7 +19093,8 @@ output_call (rtx insn, rtx *operands, int dest_operand_number, ...@@ -19086,7 +19093,8 @@ output_call (rtx insn, rtx *operands, int dest_operand_number,
int cookie_operand_number) int cookie_operand_number)
{ {
static char buf[256]; 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)) && (INTVAL (operands[cookie_operand_number]) & CALL_LONG))
{ {
tree labelname; tree labelname;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment