From: Ulrich Weigand Date: Wed, 28 Jan 2004 00:14:00 +0000 (+0000) Subject: s390.h (TARGET_DEFAULT): Default to !TARGET_BACKCHAIN. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=590fcf48ae3cd3527077ee13e54ad60b2d83037a;p=gcc.git s390.h (TARGET_DEFAULT): Default to !TARGET_BACKCHAIN. * config/s390/s390.h (TARGET_DEFAULT): Default to !TARGET_BACKCHAIN. * config/s390/s390.c (s390_return_addr_rtx): Fail for all but current frame if !TARGET_BACKCHAIN. * config/s390/s390.md ("allocate_stack"): Use pattern only if TARGET_BACKCHAIN. * doc/invoke.texi (-mbackchain/-mno-backchain): Document new default. From-SVN: r76767 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c5c093c386f..9b739909a8d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2004-01-27 Ulrich Weigand + + * config/s390/s390.h (TARGET_DEFAULT): Default to !TARGET_BACKCHAIN. + * config/s390/s390.c (s390_return_addr_rtx): Fail for all but current + frame if !TARGET_BACKCHAIN. + * config/s390/s390.md ("allocate_stack"): Use pattern only if + TARGET_BACKCHAIN. + * doc/invoke.texi (-mbackchain/-mno-backchain): Document new default. + 2004-01-27 Zack Weinberg * ia64.c (ia64_function_arg): When placing HFAs in integer diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index e19bf007879..72946aca820 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -5267,6 +5267,11 @@ s390_return_addr_rtx (int count, rtx frame) { rtx addr; + /* Without backchain, we fail for all but the current frame. */ + + if (!TARGET_BACKCHAIN && count > 0) + return NULL_RTX; + /* For the current frame, we need to make sure the initial value of RETURN_REGNUM is actually saved. */ diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index 48a91ba6666..8ef6b681af2 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -114,9 +114,9 @@ extern int target_flags; #define TARGET_IEEE_FLOAT 1 #ifdef DEFAULT_TARGET_64BIT -#define TARGET_DEFAULT 0x33 +#define TARGET_DEFAULT 0x31 #else -#define TARGET_DEFAULT 0x3 +#define TARGET_DEFAULT 0x1 #endif #define TARGET_SWITCHES \ diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 215848b9f1d..73310fa7415 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -7246,7 +7246,7 @@ (plus (reg 15) (match_operand 1 "general_operand" ""))) (set (match_operand 0 "general_operand" "") (reg 15))] - "" + "TARGET_BACKCHAIN" { rtx stack = gen_rtx (REG, Pmode, STACK_POINTER_REGNUM); rtx chain = gen_rtx (MEM, Pmode, stack); diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index c21bdf370be..440c3d78f55 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -10098,8 +10098,9 @@ generates IEEE floating-point instructions. This is the default. @opindex mno-backchain Generate (or do not generate) code which maintains an explicit backchain within the stack frame that points to the caller's frame. -This is currently needed to allow debugging. The default is to -generate the backchain. +This may be needed to allow debugging using tools that do not understand +DWARF-2 call frame information. The default is not to generate the +backchain. @item -msmall-exec @itemx -mno-small-exec