]> gcc.gnu.org Git - gcc.git/commitdiff
(gen_stdcall_suffix): Round parameter size up to
authorStan Cox <coxs@gnu.org>
Fri, 9 Aug 1996 20:51:08 +0000 (20:51 +0000)
committerStan Cox <coxs@gnu.org>
Fri, 9 Aug 1996 20:51:08 +0000 (20:51 +0000)
PARM_BOUNDARY.

From-SVN: r12608

gcc/config/i386/winnt.c

index 3a7ebf1ba5d32c8ba233735b91931ef725c32338..9920b8d4f8da7967f7c49cf97babef48999e6bb0 100644 (file)
@@ -44,13 +44,19 @@ gen_stdcall_suffix (decl)
     if (TREE_VALUE (tree_last (TYPE_ARG_TYPES (TREE_TYPE (decl)))) 
         == void_type_node)
       {
-        tree formal_type = TYPE_ARG_TYPES (TREE_TYPE (decl));
+       tree formal_type = TYPE_ARG_TYPES (TREE_TYPE (decl));
 
-        while (TREE_VALUE (formal_type) != void_type_node)
-          {
-            total += TREE_INT_CST_LOW (TYPE_SIZE (TREE_VALUE (formal_type)));
-            formal_type = TREE_CHAIN (formal_type);
-          }
+       while (TREE_VALUE (formal_type) != void_type_node)
+         {
+           int parm_size
+             = TREE_INT_CST_LOW (TYPE_SIZE (TREE_VALUE (formal_type)));
+           /* Must round up to include padding.  This is done the same
+              way as in store_one_arg.  */
+           parm_size = ((parm_size + PARM_BOUNDARY - 1)
+                        / PARM_BOUNDARY * PARM_BOUNDARY);
+           total += parm_size;
+           formal_type = TREE_CHAIN (formal_type);
+         }
       }
 
   newsym = xmalloc (strlen (asmname) + 10);
This page took 0.068501 seconds and 5 git commands to generate.