+2001-05-19 Mark Mitchell <mark@codesourcery.com>
+
+ * defaults.h (TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER): New
+ macro.
+ * tm.texi (TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER):
+ Document it.
+ * toplev.c (main): If the target does not allow profiling without
+ a frame pointer, issue an error message.
+ * config/i386/linux.h (TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER):
+ Define it to false.
+
Sat May 19 07:53:42 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* recog.c (general_operand): Modify last change to allow it if reload
2001-05-18 Mark Mitchell <mark@codesourcery.com>
+ * basic-block.h (struct basic_block_def): Add documentation about
+ what a basic block is, and what the various fields are used for.
+ * flow.c (calculate_globlal_regs_live): Add documentation about
+ how the algorithm works, and how we know that it will terminate.
+ Check that the the inductive assumption that guarantees
+ termination actually holds.
+ (mark_used_regs): Treat conditionally set registers as used.
+ (debug_regset): Add comment.
+ * rtl.texi (cond_exec): Add documentation.
+
* function.c (expand_function_start): Avoid creating BLKmode
pseudos.
fprintf (FILE, "\tcall\tmcount\n"); \
}
+/* True if it is possible to profile code that does not have a frame
+ pointer.
+
+ The GLIBC version of mcount for the x86 assumes that there is a
+ frame, so we cannot allow profiling without a frame pointer. */
+
+#undef TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER
+#define TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER false
+
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta)
#endif
+/* True if it is possible to profile code that does not have a frame
+ pointer. */
+
+#ifndef TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER
+#define TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER true
+#endif
+
#endif /* GCC_DEFAULTS_H */
@item BLOCK_PROFILER_CODE
A C function or functions which are needed in the library to
support block profiling.
+
+@findex TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER
+@item TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER
+On some targets, it is impossible to use profiling when the frame
+pointer has been omitted. For example, on x86 GNU/Linux systems,
+the @code{mcount} routine provided by the GNU C Library finds the
+address of the routine that called the routine that called @code{mcount}
+by looking in the immediate caller's stack frame. If the immediate
+caller has no frame pointer, this lookup will fail.
+
+By default, GCC assumes that the target does allow profiling when the
+frame pointer is omitted. This macro should be defined to a C
+expression that evaluates to @code{false} if the target does not allow
+profiling when the frame pointer is omitted.
+
@end table
@node Inlining
warning ("this target machine does not have delayed branches");
#endif
+ /* Some operating systems do not allow profiling without a frame
+ pointer. */
+ if (!TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER
+ && profile_flag
+ && flag_omit_frame_pointer)
+ {
+ error ("profiling does not work without a frame pointer");
+ flag_omit_frame_pointer = 0;
+ }
+
user_label_prefix = USER_LABEL_PREFIX;
if (flag_leading_underscore != -1)
{