diff options
author | John David Anglin <dave@hiauly1.hia.nrc.ca> | 2001-05-07 19:22:28 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2001-05-07 19:22:28 +0000 |
commit | 5c8cfcd63d875fee498d459317f66c32e37b1bad (patch) | |
tree | e654e4b7d5605860277f7280f0a03e75c87761dd /gcc/config | |
parent | 1a560c3a48de9f5a7113dbb0ce378542cab2e16e (diff) | |
download | gcc-5c8cfcd63d875fee498d459317f66c32e37b1bad.zip gcc-5c8cfcd63d875fee498d459317f66c32e37b1bad.tar.gz gcc-5c8cfcd63d875fee498d459317f66c32e37b1bad.tar.bz2 |
pa.md (interspace_jump): Revise comment.
* 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.
From-SVN: r41902
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/pa/pa.md | 24 | ||||
-rw-r--r-- | gcc/config/pa/som.h | 9 |
2 files changed, 27 insertions, 6 deletions
diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index abb4eab..ab587b3 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -6212,8 +6212,7 @@ ;;; 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")) @@ -6263,10 +6262,16 @@ 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"))] @@ -7124,3 +7129,18 @@ 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; +}") diff --git a/gcc/config/pa/som.h b/gcc/config/pa/som.h index ae7ae04..787321e 100644 --- a/gcc/config/pa/som.h +++ b/gcc/config/pa/som.h @@ -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. */ |