* pa.md (interspace_jump): Revise comment.
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 May 2001 19:22:28 +0000 (19:22 +0000)
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 May 2001 19:22:28 +0000 (19:22 +0000)
(builtin_longjmp): Block initial setup insns from delay slot of
interspace branch.
(builtin_setjmp_receiver): New expander to save and restore PIC
register.

* som.h (NM_FLAGS): Remove `-n' sort option.  Revise comment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41902 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/pa/pa.md
gcc/config/pa/som.h

index 5d36475..6c19698 100644 (file)
@@ -1,3 +1,13 @@
+2001-05-07  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+       * pa.md (interspace_jump): Revise comment.
+       (builtin_longjmp): Block initial setup insns from delay slot of
+       interspace branch.
+       (builtin_setjmp_receiver): New expander to save and restore PIC
+       register.
+
+       * som.h (NM_FLAGS): Remove `-n' sort option.  Revise comment.
+
 Mon May  7 09:30:14 2001  Jeffrey A Law  (law@cygnus.com)
 
        * toplev.c (compile_file): Set up the output file before we call
index abb4eab..ab587b3 100644 (file)
 
 ;;; EH does longjmp's from and within the data section.  Thus,
 ;;; an interspace branch is required for the longjmp implementation.
-;;; Registers r1 and r2 are not saved in the jmpbuf environment.
-;;; Thus, they can be used as scratch registers for the jump.
+;;; Registers r1 and r2 are used as scratch registers for the jump.
 (define_expand "interspace_jump"
   [(parallel
      [(set (pc) (match_operand 0 "pmode_register_operand" "a"))
      where to look for it when we get back to setjmp's function for
      restoring the gp.  */
   emit_move_insn (pv, lab);
+
+  /* Prevent the insns above from being scheduled into the delay slot
+     of the interspace jump because the space register could change.  */
+  emit_insn (gen_blockage ());
+
   emit_jump_insn (gen_interspace_jump (pv));
   emit_barrier ();
   DONE;
 }")
+
 ;;; Hope this is only within a function...
 (define_insn "indirect_jump"
   [(set (pc) (match_operand 0 "register_operand" "r"))]
   emit_insn (gen_blockage ());
   DONE;
 }")
+
+(define_expand "builtin_setjmp_receiver"
+  [(label_ref (match_operand 0 "" ""))]
+  "flag_pic"
+  "
+{
+  if (PIC_OFFSET_TABLE_SAVE_RTX == NULL_RTX)
+    hppa_init_pic_save ();
+
+  /* Restore the PIC register.  Hopefully, this will always be from
+     a stack slot.  The only registers that are valid after a
+     builtin_longjmp are the stack and frame pointers.  */
+  emit_move_insn (pic_offset_table_rtx, PIC_OFFSET_TABLE_SAVE_RTX);
+  DONE;
+}")
index ae7ae04..787321e 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for SOM assembler support.
-   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -52,9 +52,10 @@ Boston, MA 02111-1307, USA.  */
           "\t.stabs \"\",%d,0,0,L$text_end0000\nL$text_end0000:\n", N_SO)
 
 /* The HP supplied NM will print out the subspace names for each symbol it
-   finds, which can cause false matches when looking for ctors/dtors.  The
-   "-p" argument changes the output to not include subspace names.  */
-#define NM_FLAGS "-p -n"
+   finds, which can cause collect2 to find false matches when searching
+   for ctors/dtors.  The "-p" option changes the output to not include
+   subspace names.  The "-n" sorting option is unnecessary.  */
+#define NM_FLAGS "-p"
 
 /* HPUX has a program 'chatr' to list the dependencies of dynamically
    linked executables and shared libraries.  */