]> gcc.gnu.org Git - gcc.git/commitdiff
s390.c (s390_va_arg): Fix alignment when retrieving non-integral types from integer...
authorUlrich Weigand <uweigand@de.ibm.com>
Fri, 13 Jun 2003 13:04:34 +0000 (13:04 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Fri, 13 Jun 2003 13:04:34 +0000 (13:04 +0000)
* config/s390/s390.c (s390_va_arg): Fix alignment when retrieving
non-integral types from integer register save area slots.

From-SVN: r67894

gcc/ChangeLog
gcc/config/s390/s390.c

index 86a03b85782758a85ef7fe0205b0ff5bd0483a2f..0c120196879f89da2270de38a511cc4562e0f197 100644 (file)
@@ -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.
index 6b42699bc202a57d035dfae7ddff32869350ef51..9ca394f8dd6cec4eb04ed21fef8e5a2442bcd2c2 100644 (file)
@@ -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)
This page took 0.086273 seconds and 5 git commands to generate.