This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: (Darwin): fix -fbranch-probabilities
- From: Dale Johannesen <dalej at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Dale Johannesen <dalej at apple dot com>
- Date: Tue, 11 Feb 2003 12:34:23 -0800
- Subject: Patch: (Darwin): fix -fbranch-probabilities
This adds section name definitions in Darwin syntax, so
-fbranch-probabilities works.
Bootstrapped, built Spec -fbranch-probabilities, confirmed that both
names
are used and work.
2003-02-11 Dale Johannesen <dalej@apple.com>
* config/rs6000/darwin.h (HOT_TEXT_SECTION_NAME): Define.
(UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Define.
Index: darwin.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/darwin.h,v
retrieving revision 1.31
diff -u -d -b -w -r1.31 darwin.h
--- darwin.h 19 Dec 2002 23:46:49 -0000 1.31
+++ darwin.h 11 Feb 2003 20:33:56 -0000
@@ -87,6 +87,11 @@
(RS6000_ALIGN (current_function_outgoing_args_size, 16)
\
+ (STACK_POINTER_OFFSET))
+/* These are used by -fbranch-probabilities */
+#define HOT_TEXT_SECTION_NAME "__TEXT,__text,regular,pure_instructions"
+#define UNLIKELY_EXECUTED_TEXT_SECTION_NAME \
+
"__TEXT,__text2,regular,pure_instructions"
+
/* Define cutoff for using external functions to save floating point.
Currently on Darwin, always use inline stores. */