]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
bpabi.h (ARM_FUNCTION_PROFILER): Define new EABI compatible profiler (__gnu_mcount_nc).
authorPaul Brook <paul@codesourcery.com>
Wed, 8 Oct 2008 13:38:15 +0000 (13:38 +0000)
committerPaul Brook <pbrook@gcc.gnu.org>
Wed, 8 Oct 2008 13:38:15 +0000 (13:38 +0000)
2008-10-08  Paul Brook  <paul@codesourcery.com>

gcc/
* config/arm/bpabi.h (ARM_FUNCTION_PROFILER): Define new EABI
compatible profiler (__gnu_mcount_nc).
(SUBTARGET_FRAME_POINTER_REQUIRED): Define.

From-SVN: r140974

gcc/ChangeLog
gcc/config/arm/bpabi.h

index 9fc2a98f50a839daa779cbd42b306a747607807e..f3ce56fa5701d05dfa62a339ca68c43929092f24 100644 (file)
@@ -1,3 +1,9 @@
+2008-10-08  Paul Brook  <paul@codesourcery.com>
+
+       * config/arm/bpabi.h (ARM_FUNCTION_PROFILER): Define new EABI
+       compatible profiler (__gnu_mcount_nc).
+       (SUBTARGET_FRAME_POINTER_REQUIRED): Define.
+
 2008-10-08  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/i386/i386.c (initial_ix86_tune_features): Add
index 38be1da261a2b1ecebf6fc4d2e565782bc6ad920..c8cdc3db087a59d5ef296352110adf514df8a0c4 100644 (file)
 #undef FINI_SECTION_ASM_OP
 #define INIT_ARRAY_SECTION_ASM_OP ARM_EABI_CTORS_SECTION_OP
 #define FINI_ARRAY_SECTION_ASM_OP ARM_EABI_DTORS_SECTION_OP
+
+/* The legacy _mcount implementation assumes r11 points to a
+    4-word APCS frame.  This is generally not true for EABI targets,
+    particularly not in Thumb mode.  We assume the mcount
+    implementation does not require a counter variable (No Counter).
+    Note that __gnu_mcount_nc will be entered with a misaligned stack.
+    This is OK because it uses a special calling convention anyway.  */
+
+#undef  ARM_FUNCTION_PROFILER
+#define ARM_FUNCTION_PROFILER(STREAM, LABELNO)                         \
+{                                                                      \
+  fprintf (STREAM, "\tpush\t{lr}\n");                                  \
+  fprintf (STREAM, "\tbl\t__gnu_mcount_nc\n");                         \
+}
+
+#undef SUBTARGET_FRAME_POINTER_REQUIRED
+#define SUBTARGET_FRAME_POINTER_REQUIRED 0