]> git.pld-linux.org Git - packages/gcc.git/blob - gcc32-i386-profile-olfp.patch
- added pr12965 patch (fixes optimization/12965, dar.spec@alpha issue)
[packages/gcc.git] / gcc32-i386-profile-olfp.patch
1 2002-05-30  Richard Henderson  <rth@redhat.com>
2
3         * defaults.h (TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER): Kill.
4         * toplev.c (process_options): Don't check it.
5         * doc/tm.texi: Don't document it.
6         * config/i386/linux.h (SUBTARGET_FRAME_POINTER_REQUIRED): New.
7         (TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER): Kill.
8         * config/i386/i386.c (ix86_frame_pointer_required): Suppress leaf
9         frame pointer optimization if current_function_profile.
10
11 --- gcc/doc/tm.texi.jj  Fri May  3 19:25:59 2002
12 +++ gcc/doc/tm.texi     Tue Jun  4 23:18:43 2002
13 @@ -4077,22 +4077,6 @@ must not use the @var{labelno} argument 
14  @item PROFILE_BEFORE_PROLOGUE
15  Define this macro if the code for function profiling should come before
16  the function prologue.  Normally, the profiling code comes after.
17 -
18 -
19 -@findex TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER
20 -@item TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER
21 -On some targets, it is impossible to use profiling when the frame
22 -pointer has been omitted.  For example, on x86 GNU/Linux systems,
23 -the @code{mcount} routine provided by the GNU C Library finds the
24 -address of the routine that called the routine that called @code{mcount}
25 -by looking in the immediate caller's stack frame.  If the immediate
26 -caller has no frame pointer, this lookup will fail.
27 -
28 -By default, GCC assumes that the target does allow profiling when the
29 -frame pointer is omitted.  This macro should be defined to a C
30 -expression that evaluates to @code{false} if the target does not allow
31 -profiling when the frame pointer is omitted.
32 -
33  @end table
34  
35  @node Tail Calls
36 --- gcc/config/i386/i386.c.jj   Tue Jun  4 21:13:34 2002
37 +++ gcc/config/i386/i386.c      Tue Jun  4 23:18:43 2002
38 @@ -3827,7 +3827,8 @@ ix86_frame_pointer_required ()
39    /* In override_options, TARGET_OMIT_LEAF_FRAME_POINTER turns off
40       the frame pointer by default.  Turn it back on now if we've not
41       got a leaf function.  */
42 -  if (TARGET_OMIT_LEAF_FRAME_POINTER && ! leaf_function_p ())
43 +  if (TARGET_OMIT_LEAF_FRAME_POINTER
44 +      && (!current_function_is_leaf || current_function_profile))
45      return 1;
46  
47    return 0;
48 --- gcc/config/i386/linux.h.jj  Tue Apr 16 08:15:02 2002
49 +++ gcc/config/i386/linux.h     Tue Jun  4 23:18:43 2002
50 @@ -63,14 +63,11 @@ Boston, MA 02111-1307, USA.  */
51      fprintf (FILE, "\tcall\tmcount\n");                                        \
52  }
53  
54 -/* True if it is possible to profile code that does not have a frame
55 -   pointer.  
56 -
57 -   The GLIBC version of mcount for the x86 assumes that there is a
58 +/* The GLIBC version of mcount for the x86 assumes that there is a
59     frame, so we cannot allow profiling without a frame pointer.  */
60  
61 -#undef TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER
62 -#define TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER false
63 +#undef SUBTARGET_FRAME_POINTER_REQUIRED
64 +#define SUBTARGET_FRAME_POINTER_REQUIRED current_function_profile
65  
66  #undef SIZE_TYPE
67  #define SIZE_TYPE "unsigned int"
68 --- gcc/defaults.h.jj   Fri May  3 19:24:51 2002
69 +++ gcc/defaults.h      Tue Jun  4 23:18:43 2002
70 @@ -398,13 +398,6 @@ do {                                                               \
71     ? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta)
72  #endif
73  
74 -/* True if it is possible to profile code that does not have a frame
75 -   pointer.  */
76 -
77 -#ifndef TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER
78 -#define TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER true
79 -#endif
80 -
81  #ifndef DEFAULT_GDB_EXTENSIONS
82  #define DEFAULT_GDB_EXTENSIONS 1
83  #endif
84 --- gcc/toplev.c.jj     Thu May 30 11:08:44 2002
85 +++ gcc/toplev.c        Tue Jun  4 23:19:11 2002
86 @@ -4908,16 +4908,6 @@ process_options ()
87      warning ("this target machine does not have delayed branches");
88  #endif
89  
90 -  /* Some operating systems do not allow profiling without a frame
91 -     pointer.  */
92 -  if (!TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER
93 -      && profile_flag
94 -      && flag_omit_frame_pointer)
95 -    {
96 -      error ("profiling does not work without a frame pointer");
97 -      flag_omit_frame_pointer = 0;
98 -    }
99 -    
100    user_label_prefix = USER_LABEL_PREFIX;
101    if (flag_leading_underscore != -1)
102      {
This page took 0.03055 seconds and 3 git commands to generate.