diff options
author | Andreas Krebbel <krebbel1@de.ibm.com> | 2005-01-11 10:15:32 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2005-01-11 10:15:32 +0000 |
commit | 6b78f6bee5f2b59657ecb652fcb289e8db3af8dd (patch) | |
tree | 0162f7a0afe6dc1ad13cacd2f97988fe2c5b7b53 | |
parent | 66480e9146cbc7bf9706d396c0f54fbb9d48adeb (diff) | |
download | gcc-6b78f6bee5f2b59657ecb652fcb289e8db3af8dd.zip gcc-6b78f6bee5f2b59657ecb652fcb289e8db3af8dd.tar.gz gcc-6b78f6bee5f2b59657ecb652fcb289e8db3af8dd.tar.bz2 |
s390.c (override_options): Return error if -mbackchain, -mpacked-stack and -mhard-float are used together.
2005-01-11 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.c (override_options): Return error if
-mbackchain, -mpacked-stack and -mhard-float are used together.
(s390_va_start): Remove the backchain && packed-stack special case.
(s390_gimplify_va_arg): Likewise.
* doc/invoke.texi: Remove the ABI incompatibility note.
From-SVN: r93182
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 25 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 10 |
3 files changed, 24 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ece44ff..c10fefa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2005-01-11 Andreas Krebbel <krebbel1@de.ibm.com> + * config/s390/s390.c (override_options): Return error if + -mbackchain, -mpacked-stack and -mhard-float are used together. + (s390_va_start): Remove the backchain && packed-stack special case. + (s390_gimplify_va_arg): Likewise. + * doc/invoke.texi: Remove the ABI incompatibility note. + +2005-01-11 Andreas Krebbel <krebbel1@de.ibm.com> + * config/s390/s390.c (struct s390_frame_layout): Remove save_backchain_p. (s390_frame_info, s390_emit_prologue): Replace occurrences of diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index cd174c7..92ec196 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -1424,6 +1424,10 @@ override_options (void) s390_cost = &z900_cost; + if (TARGET_BACKCHAIN && TARGET_PACKED_STACK && TARGET_HARD_FLOAT) + error ("-mbackchain -mpacked-stack -mhard-float are not supported " + "in combination."); + if (s390_warn_framesize_string) { if (sscanf (s390_warn_framesize_string, HOST_WIDE_INT_PRINT_DEC, @@ -7711,15 +7715,9 @@ s390_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) /* Find the register save area. */ t = make_tree (TREE_TYPE (sav), return_address_pointer_rtx); - if (TARGET_BACKCHAIN && TARGET_PACKED_STACK) /* kernel stack layout */ - t = build (PLUS_EXPR, TREE_TYPE (sav), t, - build_int_cst (NULL_TREE, - -(RETURN_REGNUM - 2) * UNITS_PER_WORD - - (TARGET_64BIT ? 4 : 2) * 8)); - else - t = build (PLUS_EXPR, TREE_TYPE (sav), t, - build_int_cst (NULL_TREE, -RETURN_REGNUM * UNITS_PER_WORD)); - + t = build (PLUS_EXPR, TREE_TYPE (sav), t, + build_int_cst (NULL_TREE, -RETURN_REGNUM * UNITS_PER_WORD)); + t = build (MODIFY_EXPR, TREE_TYPE (sav), sav, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); @@ -7787,8 +7785,7 @@ s390_gimplify_va_arg (tree valist, tree type, tree *pre_p, /* kernel stack layout on 31 bit: It is assumed here that no padding will be added by s390_frame_info because for va_args always an even number of gprs has to be saved r15-r2 = 14 regs. */ - sav_ofs = ((TARGET_BACKCHAIN && TARGET_PACKED_STACK) ? - (TARGET_64BIT ? 4 : 2) * 8 : 2 * UNITS_PER_WORD); + sav_ofs = 2 * UNITS_PER_WORD; sav_scale = UNITS_PER_WORD; size = UNITS_PER_WORD; max_reg = 4; @@ -7805,8 +7802,7 @@ s390_gimplify_va_arg (tree valist, tree type, tree *pre_p, indirect_p = 0; reg = fpr; n_reg = 1; - sav_ofs = ((TARGET_BACKCHAIN && TARGET_PACKED_STACK) ? - 0 : 16 * UNITS_PER_WORD); + sav_ofs = 16 * UNITS_PER_WORD; sav_scale = 8; /* TARGET_64BIT has up to 4 parameter in fprs */ max_reg = TARGET_64BIT ? 3 : 1; @@ -7827,8 +7823,7 @@ s390_gimplify_va_arg (tree valist, tree type, tree *pre_p, /* kernel stack layout on 31 bit: It is assumed here that no padding will be added by s390_frame_info because for va_args always an even number of gprs has to be saved r15-r2 = 14 regs. */ - sav_ofs = ((TARGET_BACKCHAIN && TARGET_PACKED_STACK) ? - (TARGET_64BIT ? 4 : 2) * 8 : 2 * UNITS_PER_WORD); + sav_ofs = 2 * UNITS_PER_WORD; if (size < UNITS_PER_WORD) sav_ofs += UNITS_PER_WORD - size; diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index bb8659a..9de9b84 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -10892,8 +10892,9 @@ 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. +@option{-mbackchain}. Note that the combination of @option{-mbackchain}, +@option{-mpacked-stack} and @option{-mhard-float} is not supported. In order +to build a linux kernel use @option{-msoft-float}. The default is to not maintain the backchain. @@ -10917,8 +10918,9 @@ As long as the stack frame backchain is not used, code generated with 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. +combination of @option{-mbackchain}, +@option{-mpacked-stack} and @option{-mhard-float} is not supported. In order +to build a linux kernel use @option{-msoft-float}. The default is to not use the packed stack layout. |