aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2008-10-08 13:38:15 +0000
committerPaul Brook <pbrook@gcc.gnu.org>2008-10-08 13:38:15 +0000
commita7e8c6529f38a95a89c7b3a19a309401ffa7b6d4 (patch)
treeab282aadee2694c7693ec8730d9cbec55529c22a /gcc/config
parent54723b46231868447f68ed5322d916bd05bffae3 (diff)
downloadgcc-a7e8c6529f38a95a89c7b3a19a309401ffa7b6d4.zip
gcc-a7e8c6529f38a95a89c7b3a19a309401ffa7b6d4.tar.gz
gcc-a7e8c6529f38a95a89c7b3a19a309401ffa7b6d4.tar.bz2
bpabi.h (ARM_FUNCTION_PROFILER): Define new EABI compatible profiler (__gnu_mcount_nc).
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
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/arm/bpabi.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/config/arm/bpabi.h b/gcc/config/arm/bpabi.h
index 38be1da..c8cdc3d 100644
--- a/gcc/config/arm/bpabi.h
+++ b/gcc/config/arm/bpabi.h
@@ -147,3 +147,20 @@
#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