+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
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,
/* 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);
/* 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;
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;
/* 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;
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.
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.