This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Don't generate branch islands on ppc darwin9 (for 4.2)


This is just like the other one... but for 4.2...

2007-02-02  Mike Stump  <mrs@apple.com>

	* config.gcc (*-*-darwin*): Backport darwin9.h bits.
	* config/darwin9.h: Add.
	* config/rs6000/rs6000.c (DARWIN_GENERATE_ISLANDS): Add.
	(output_call): Use DARWIN_GENERATE_ISLANDS to decide when to
	generate a branch island.

Doing diffs in .:
--- ./config/darwin9.h.~1~	2007-02-02 21:08:45.000000000 -0800
+++ ./config/darwin9.h	2007-02-02 21:00:54.000000000 -0800
@@ -0,0 +1,2 @@
+/* The linker can generate branch islands.  */
+#define DARWIN_LINKER_GENERATES_ISLANDS 1
--- ./config/rs6000/rs6000.c.~1~	2007-02-02 20:55:18.000000000 -0800
+++ ./config/rs6000/rs6000.c	2007-02-02 21:02:22.000000000 -0800
@@ -744,7 +744,6 @@ static int rs6000_arg_partial_bytes (CUM
 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);
@@ -18049,6 +18048,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.
 
@@ -18059,7 +18066,8 @@ output_call (rtx insn, rtx *operands, in
 	     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;
--- ./config.gcc.~1~	2007-01-18 14:34:01.000000000 -0800
+++ ./config.gcc	2007-02-02 20:58:28.000000000 -0800
@@ -364,7 +364,13 @@ esac
 # Common parts for widely ported systems.
 case ${target} in
 *-*-darwin*)
-  tm_file="${tm_file} darwin.h ${cpu_type}/darwin.h"
+  tm_file="${tm_file} darwin.h"
+  case ${target} in
+  *-*-darwin9*)
+    tm_file="${tm_file} darwin9.h"
+    ;;
+  esac
+  tm_file="${tm_file} ${cpu_type}/darwin.h"
   tm_p_file="${tm_p_file} darwin-protos.h"
   tmake_file="t-darwin ${cpu_type}/t-darwin t-slibgcc-darwin"
   target_gtfiles="\$(srcdir)/config/darwin.c"
--------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]