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]

More thorough removal of HAVE_probe


Larin Hennessy reported earlier this week that the last target that
did anything with HAVE_probe has gone, and provided a patch to remove
its use in explow.c.  I found some related code in the m68k back end
and a reference in the documentation.  This patch removes all of it.

Tested by building an m68k-elf cross compiler; I have not tried to use
that compiler for anything, but I consider this quite low risk since
all of this code was removed by preprocessor conditionals anyway.

We do not appear to be poisoning named patterns that are removed, but
that may just be because it hasn't happened before.  It would be easy
enough to do (poison HAVE_xxxx) -- should we?

zw

2003-05-23  Larin Hennessy <larin@science.oregonstate.edu>
            Zack Weinberg <zack@codesourcery.com>

        * explow.c (allocate_dynamic_stack_space): Remove call to gen_probe.
        * config/m68k/m68k.c (m68k_output_function_prologue): Remove code
        under #if NEED_PROBE.
        * config/m68k/m68k.h: Don't define NEED_PROBE.
        * config/m68k/m68k.md: Remove "probe" insn.
        * doc/md.texi: Remove documentation of "probe" pattern.

===================================================================
Index: explow.c
--- explow.c	20 May 2003 01:49:11 -0000	1.110
+++ explow.c	23 May 2003 17:54:57 -0000
@@ -1448,13 +1448,6 @@ allocate_dynamic_stack_space (size, targ
 			    NULL_RTX, 1);
     }
 
-  /* Some systems require a particular insn to refer to the stack
-     to make the pages exist.  */
-#ifdef HAVE_probe
-  if (HAVE_probe)
-    emit_insn (gen_probe ());
-#endif
-
   /* Record the new stack level for nonlocal gotos.  */
   if (nonlocal_goto_handler_slots != 0)
     emit_stack_save (SAVE_NONLOCAL, &nonlocal_goto_stack_level, NULL_RTX);
===================================================================
Index: config/m68k/m68k.c
--- config/m68k/m68k.c	22 May 2003 17:54:19 -0000	1.84
+++ config/m68k/m68k.c	23 May 2003 17:55:30 -0000
@@ -519,14 +519,6 @@ m68k_output_function_prologue (stream, s
         num_saved_regs++;
       }
 
-#if NEED_PROBE
-#ifdef MOTOROLA
-  asm_fprintf (stream, "\ttst.l %d(%Rsp)\n", NEED_PROBE - num_saved_regs * 4);
-#else
-  asm_fprintf (stream, "\ttstl %Rsp@(%d)\n", NEED_PROBE - num_saved_regs * 4);
-#endif
-#endif
-
   /* If the stack limit is not a symbol, check it here.  
      This has the disadvantage that it may be too late...  */
   if (current_function_limit_stack)
===================================================================
Index: config/m68k/m68k.h
--- config/m68k/m68k.h	22 May 2003 17:54:20 -0000	1.88
+++ config/m68k/m68k.h	23 May 2003 17:55:33 -0000
@@ -671,11 +671,6 @@ enum reg_class {
    makes the stack pointer a smaller address.  */
 #define STACK_GROWS_DOWNWARD
 
-/* Nonzero if we need to generate stack-probe insns.
-   On most systems they are not needed.
-   When they are needed, define this as the stack offset to probe at.  */
-#define NEED_PROBE 0
-
 /* Define this if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
===================================================================
Index: config/m68k/m68k.md
--- config/m68k/m68k.md	18 May 2003 21:51:14 -0000	1.57
+++ config/m68k/m68k.md	23 May 2003 17:55:35 -0000
@@ -7000,15 +7000,6 @@
   ""
   "nop")
 
-(define_insn "probe"
- [(reg:SI 15)]
- "NEED_PROBE"
- "*
-{
-  operands[0] = plus_constant (stack_pointer_rtx, NEED_PROBE);
-  return \"tstl %a0\";
-}")
-
 ;; Used for frameless functions which save no regs and allocate no locals.
 (define_insn "return"
   [(return)]
===================================================================
Index: doc/md.texi
--- doc/md.texi	17 May 2003 18:20:55 -0000	1.68
+++ doc/md.texi	23 May 2003 17:55:38 -0000
@@ -3270,18 +3270,6 @@ Some machines require other operations s
 maintaining the back chain.  Define this pattern to emit those
 operations in addition to updating the stack pointer.
 
-@cindex @code{probe} instruction pattern
-@item @samp{probe}
-Some machines require instructions to be executed after space is
-allocated from the stack, for example to generate a reference at
-the bottom of the stack.
-
-If you need to emit instructions before the stack has been adjusted,
-put them into the @samp{allocate_stack} pattern.  Otherwise, define
-this pattern to emit the required instructions.
-
-No operands are provided.
-
 @cindex @code{check_stack} instruction pattern
 @item @samp{check_stack}
 If stack checking cannot be done on your system by probing the stack with


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