aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2003-06-13 13:04:34 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2003-06-13 13:04:34 +0000
commitc873e11f46a1fee89d9205052fc4455276ab723c (patch)
treea36f45b1865416e4e4e71bfe03ca5a5f790339d9
parentbec3e66d1a37c885eb41556e322e150b6241dfb0 (diff)
downloadgcc-c873e11f46a1fee89d9205052fc4455276ab723c.zip
gcc-c873e11f46a1fee89d9205052fc4455276ab723c.tar.gz
gcc-c873e11f46a1fee89d9205052fc4455276ab723c.tar.bz2
s390.c (s390_va_arg): Fix alignment when retrieving non-integral types from integer register save...
* config/s390/s390.c (s390_va_arg): Fix alignment when retrieving non-integral types from integer register save area slots. From-SVN: r67894
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/s390/s390.c9
2 files changed, 7 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 86a03b8..0c12019 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-13 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * config/s390/s390.c (s390_va_arg): Fix alignment when retrieving
+ non-integral types from integer register save area slots.
+
2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
* config/i386/svr3dbx.h: GNU CC -> GCC; Intel 385 -> Intel 386.
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 6b42699..9ca394f 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -6073,13 +6073,8 @@ s390_va_arg (valist, type)
reg = gpr;
n_reg = (size + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
sav_ofs = 2 * UNITS_PER_WORD;
- if (TARGET_64BIT)
- sav_ofs += TYPE_MODE (type) == SImode ? 4 :
- TYPE_MODE (type) == HImode ? 6 :
- TYPE_MODE (type) == QImode ? 7 : 0;
- else
- sav_ofs += TYPE_MODE (type) == HImode ? 2 :
- TYPE_MODE (type) == QImode ? 3 : 0;
+ if (size < UNITS_PER_WORD)
+ sav_ofs += UNITS_PER_WORD - size;
sav_scale = UNITS_PER_WORD;
if (n_reg > 1)