From 646a946e7a29d3189d190c3996a146af827a5586 Mon Sep 17 00:00:00 2001 From: uweigand Date: Tue, 23 Nov 2004 17:39:59 +0000 Subject: 2004-11-23 Andreas Krebbel * config/s390/s390.c (s390_backchain_string): Removed. (s390_return_addr_rtx, s390_back_chain_rtx, s390_frame_info) (s390_emit_prologue, s390_va_start, s390_gimplify_va_arg): Changed users of TARGET_BACKCHAIN, TARGET_NO_BACKCHAIN and TARGET_KERNEL_BACKCHAIN to reflect the new options. * config/s390/s390.h (MASK_BACKCHAIN, MASK_PACKED_STACK): New macros. (TARGET_KERNEL_BACKCHAIN): Removed. (TARGET_BACKCHAIN): Former triple state option change to a target flag. (TARGET_PACKED_STACK): New macro. (TARGET_SWITCHES): New switches added. (TARGET_OPTIONS): "backchain", "no-backchain" and "kernel-backchain" removed. (DYNAMIC_CHAIN_ADDRESS): Use TARGET_PACKED_STACK. * config/s390/s390.md ("allocate_stack", "restore_stack_block") ("save_stack_nonlocal", "restore_stack_nonlocal"): Modified to reflect the change in target switch semantics. * config/s390/tpf.h (TARGET_DEFAULT_BACKCHAIN): Removed. (TARGET_DEFAULT): MASK_BACKCHAIN added. * doc/invoke.texi: Added documentation for the new/changed options. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91096 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/doc/invoke.texi | 59 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 18 deletions(-) (limited to 'gcc/doc/invoke.texi') diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index d6391dda24d..5796474594a 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -623,7 +623,8 @@ See RS/6000 and PowerPC Options. @emph{S/390 and zSeries Options} @gccoptlist{-mtune=@var{cpu-type} -march=@var{cpu-type} @gol --mhard-float -msoft-float -mbackchain -mno-backchain -mkernel-backchain @gol +-mhard-float -msoft-float -mbackchain -mno-backchain @gol +-mpacked-stack -mno-packed-stack @gol -msmall-exec -mno-small-exec -mmvcle -mno-mvcle @gol -m64 -m31 -mdebug -mno-debug -mesa -mzarch @gol -mtpf-trace -mno-tpf-trace -mfused-madd -mno-fused-madd @gol @@ -10827,27 +10828,49 @@ generates IEEE floating-point instructions. This is the default. @item -mbackchain @itemx -mno-backchain -@itemx -mkernel-backchain @opindex mbackchain @opindex mno-backchain -@opindex mkernel-backchain -In order to provide a backchain the address of the caller's frame -is stored within the callee's stack frame. +Store (do not store) the address of the caller's frame as backchain pointer +into the callee's stack frame. A backchain may be needed to allow debugging using tools that do not understand DWARF-2 call frame information. -For @option{-mno-backchain} no backchain is maintained at all which is the -default. -If one of the other options is present the backchain pointer is placed either -on top of the stack frame (@option{-mkernel-backchain}) or on -the bottom (@option{-mbackchain}). -Beside the different backchain location @option{-mkernel-backchain} -also changes stack frame layout breaking the ABI@. This option -is intended to be used for code which internally needs a backchain but has -to get by with a limited stack size e.g.@: the linux kernel. -Internal unwinding code not using DWARF-2 info has to be able to locate the -return address of a function. That will be eased be the fact that -the return address of a function is placed two words below the backchain -pointer. +When @option{-mno-packed-stack} is in effect, the backchain pointer is stored +at the bottom of the stack frame; when @option{-mpacked-stack} is in effect, +the backchain is placed into the topmost word of the 96/160 byte register +save area. + +In general, code compiled with @option{-mbackchain} is call-compatible with +code compiled with @option{-mmo-backchain}; however, use of the backchain +for debugging purposes usually requires that the whole binary is built with +@option{-mbackchain}. Note that the combination of @option{-mbackchain} and +@option{-mpacked-stack} generates code that is not ABI-compatible. + +The default is to not maintain the backchain. + +@item -mpacked-stack +@item -mno-packed-stack +@opindex mpacked-stack +@opindex mno-packed-stack +Use (do not use) the packed stack layout. When @option{-mno-packed-stack} is +specified, the compiler uses the all fields of the 96/160 byte register save +area only for their default purpose; unused fields still take up stack space. +When @option{-mpacked-stack} is specified, register save slots are densely +packed at the top of the register save area; unused space is reused for other +purposes, allowing for more efficient use of the available stack space. +However, when @option{-mbackchain} is also in effect, the topmost word of +the save area is always used to store the backchain, and the return address +register is always saved two words below the backchain. + +As long as the stack frame backchain is not used, code generated with +@option{-mpacked-stack} is call-compatible with code generated with +@option{-mno-packed-stack}. Note that some non-FSF releases of GCC 2.95 for +S/390 or zSeries generated code that uses the stack frame backchain at run +time, not just for debugging purposes. Such code is not call-compatible +with code compiled with @option{-mpacked-stack}. Also, note that the +combination of @option{-mbackchain} and @option{-mpacked-stack} generates code +that is not ABI-compatible. + +The default is to not use the packed stack layout. @item -msmall-exec @itemx -mno-small-exec -- cgit v1.2.1