This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix gcc.dg/20021014-1.c on alpha


The PUSH/POP macros are useless because they don't end up
surrounding the call to mcount, since mcount is invoked in
a special way after the prologue.

They are worse then useless because they break the load of
the GP register, which means the call to mcount goes to
neverneverland.  :-(

They are obsolete, because any target that actually needed
them can use PROFILE_HOOK to emit the call to mcount as a
regular function, and so automagically save and restore all
registers that needed it.

Finally, to my knowledge, no Alpha port uses profile counters
emitted by the compiler into the data segment.


r~


        * config/alpha/alpha.h (NO_PROFILE_COUNTERS): Set.
        (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Kill.

Index: config/alpha/alpha.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.h,v
retrieving revision 1.187
diff -c -p -d -u -r1.187 alpha.h
--- config/alpha/alpha.h	20 Dec 2002 19:42:41 -0000	1.187
+++ config/alpha/alpha.h	10 Jan 2003 23:52:12 -0000
@@ -1210,6 +1210,10 @@ extern struct alpha_compare alpha_compar
 
 #define PROFILE_BEFORE_PROLOGUE 1
 
+/* Never use profile counters.  */
+
+#define NO_PROFILE_COUNTERS 1
+
 /* Output assembler code to FILE to increment profiler label # LABELNO
    for profiling a function entry.  Under OSF/1, profiling is enabled
    by simply passing -pg to the assembler and linker.  */
@@ -1808,22 +1812,6 @@ do {						\
     }									      \
   }									      \
   while (0)
-
-/* This is how to output an insn to push a register on the stack.
-   It need not be very fast code.  */
-
-#define ASM_OUTPUT_REG_PUSH(FILE,REGNO)					\
- fprintf (FILE, "\tsubq $30,8,$30\n\tst%s $%s%d,0($30)\n",		\
-	  (REGNO) > 32 ? "t" : "q", (REGNO) > 32 ? "f" : "",		\
-	  (REGNO) & 31);
-
-/* This is how to output an insn to pop a register from the stack.
-   It need not be very fast code.  */
-
-#define ASM_OUTPUT_REG_POP(FILE,REGNO)					\
-  fprintf (FILE, "\tld%s $%s%d,0($30)\n\taddq $30,8,$30\n",		\
-	  (REGNO) > 32 ? "t" : "q", (REGNO) > 32 ? "f" : "",		\
-	  (REGNO) & 31);
 
 /* This is how to output an element of a case-vector that is absolute.
    (Alpha does not use such vectors, but we must define this macro anyway.)  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]