diff options
author | Andreas Krebbel <krebbel1@de.ibm.com> | 2003-09-26 16:41:58 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2003-09-26 16:41:58 +0000 |
commit | 43ab026f2a019405f7e5af2a35ac41467dc35111 (patch) | |
tree | 58dee49186ddcd5d4654bb638df7a1ff7afce183 /gcc | |
parent | 853ca657f0659b0ad6a387a2089cebc631b4bb36 (diff) | |
download | gcc-43ab026f2a019405f7e5af2a35ac41467dc35111.zip gcc-43ab026f2a019405f7e5af2a35ac41467dc35111.tar.gz gcc-43ab026f2a019405f7e5af2a35ac41467dc35111.tar.bz2 |
s390.md ("builtin_setjmp_setup"): Insn deleted.
2003-09-26 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.md ("builtin_setjmp_setup"): Insn deleted.
("builtin_longjmp"): Insn deleted.
("save_stack_nonlocal"): Save literal pool base pointer behind
backchain and stack pointer.
("restore_stack_nonlocal"): Restore literal pool base pointer.
* config/s390/s390.h (STACK_SAVEAREA_MODE): Double size of
the stack save area for the nonlocal goto case.
From-SVN: r71826
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/s390/s390.h | 2 | ||||
-rw-r--r-- | gcc/config/s390/s390.md | 61 |
3 files changed, 29 insertions, 44 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1290e0d..7cafd70 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2003-09-26 Andreas Krebbel <krebbel1@de.ibm.com> + + * config/s390/s390.md ("builtin_setjmp_setup"): Insn deleted. + ("builtin_longjmp"): Insn deleted. + ("save_stack_nonlocal"): Save literal pool base pointer behind + backchain and stack pointer. + ("restore_stack_nonlocal"): Restore literal pool base pointer. + * config/s390/s390.h (STACK_SAVEAREA_MODE): Double size of + the stack save area for the nonlocal goto case. + 2003-09-26 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> PR bootstrap/12358 diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index 5cd1d46..b395370 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -240,7 +240,7 @@ if (INTEGRAL_MODE_P (MODE) && \ NONLOCAL needs twice Pmode to maintain both backchain and SP. */ #define STACK_SAVEAREA_MODE(LEVEL) \ (LEVEL == SAVE_FUNCTION ? VOIDmode \ - : LEVEL == SAVE_NONLOCAL ? (TARGET_64BIT ? TImode : DImode) : Pmode) + : LEVEL == SAVE_NONLOCAL ? (TARGET_64BIT ? OImode : TImode) : Pmode) /* Define target floating point format. */ #define TARGET_FLOAT_FORMAT \ diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index b2eff87..973217f 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -7057,20 +7057,9 @@ ; -; setjmp/longjmp instruction pattern(s). +; setjmp instruction pattern. ; -(define_expand "builtin_setjmp_setup" - [(match_operand 0 "register_operand" "")] - "" -{ - rtx base = gen_rtx_MEM (Pmode, plus_constant (operands[0], 4 * GET_MODE_SIZE (Pmode))); - rtx basereg = gen_rtx_REG (Pmode, BASE_REGISTER); - - emit_move_insn (base, basereg); - DONE; -}) - (define_expand "builtin_setjmp_receiver" [(match_operand 0 "" "")] "flag_pic" @@ -7080,31 +7069,6 @@ DONE; }) -(define_expand "builtin_longjmp" - [(match_operand 0 "register_operand" "")] - "" -{ - /* The elements of the buffer are, in order: */ - rtx fp = gen_rtx_MEM (Pmode, operands[0]); - rtx lab = gen_rtx_MEM (Pmode, plus_constant (operands[0], GET_MODE_SIZE (Pmode))); - rtx stack = gen_rtx_MEM (Pmode, plus_constant (operands[0], 2 * GET_MODE_SIZE (Pmode))); - rtx base = gen_rtx_MEM (Pmode, plus_constant (operands[0], 4 * GET_MODE_SIZE (Pmode))); - rtx basereg = gen_rtx_REG (Pmode, BASE_REGISTER); - rtx jmp = gen_reg_rtx (Pmode); - - emit_move_insn (jmp, lab); - emit_move_insn (basereg, base); - emit_stack_restore (SAVE_NONLOCAL, stack, NULL_RTX); - emit_move_insn (hard_frame_pointer_rtx, fp); - - emit_insn (gen_rtx_USE (VOIDmode, hard_frame_pointer_rtx)); - emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx)); - emit_insn (gen_rtx_USE (VOIDmode, basereg)); - emit_indirect_jump (jmp); - DONE; -}) - - ;; These patterns say how to save and restore the stack pointer. We need not ;; save the stack pointer at function level since we are careful to ;; preserve the backchain. At block level, we have to restore the backchain @@ -7144,13 +7108,17 @@ { rtx temp = gen_reg_rtx (Pmode); - /* Copy the backchain to the first word, sp to the second. */ + /* Copy the backchain to the first word, sp to the second and the literal pool + base to the third. */ + emit_move_insn (operand_subword (operands[0], 2, 0, + TARGET_64BIT ? OImode : TImode), + gen_rtx_REG (Pmode, BASE_REGISTER)); emit_move_insn (temp, gen_rtx_MEM (Pmode, operands[1])); emit_move_insn (operand_subword (operands[0], 0, 0, - TARGET_64BIT ? TImode : DImode), + TARGET_64BIT ? OImode : TImode), temp); emit_move_insn (operand_subword (operands[0], 1, 0, - TARGET_64BIT ? TImode : DImode), + TARGET_64BIT ? OImode : TImode), operands[1]); DONE; }) @@ -7161,15 +7129,22 @@ "" { rtx temp = gen_reg_rtx (Pmode); + rtx base = gen_rtx_REG (Pmode, BASE_REGISTER); - /* Restore the backchain from the first word, sp from the second. */ + /* Restore the backchain from the first word, sp from the second and the + literal pool base from the third. */ emit_move_insn (temp, operand_subword (operands[1], 0, 0, - TARGET_64BIT ? TImode : DImode)); + TARGET_64BIT ? OImode : TImode)); emit_move_insn (operands[0], operand_subword (operands[1], 1, 0, - TARGET_64BIT ? TImode : DImode)); + TARGET_64BIT ? OImode : TImode)); emit_move_insn (gen_rtx_MEM (Pmode, operands[0]), temp); + emit_move_insn (base, + operand_subword (operands[1], 2, 0, + TARGET_64BIT ? OImode : TImode)); + emit_insn (gen_rtx_USE (VOIDmode, base)); + DONE; }) |