diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2000-11-11 06:04:59 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2000-11-11 06:04:59 +0000 |
commit | 3650b6953db819a6ba3c173fe3440d3e565b42eb (patch) | |
tree | a23ef84b45b015464129d27e1ffb7729b54c2e0c /gcc/builtins.c | |
parent | 93a77848075d53362d57c21736c8baa141afe468 (diff) | |
download | gcc-3650b6953db819a6ba3c173fe3440d3e565b42eb.zip gcc-3650b6953db819a6ba3c173fe3440d3e565b42eb.tar.gz gcc-3650b6953db819a6ba3c173fe3440d3e565b42eb.tar.bz2 |
builtins.c (std_expand_builtin_va_start): Take PARM_BOUNDARY into account.
* builtins.c (std_expand_builtin_va_start): Take PARM_BOUNDARY
into account.
From-SVN: r37381
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 8430a23..68a0e41 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -2250,14 +2250,18 @@ stabilize_va_list (valist, needs_lvalue) the variable. */ void std_expand_builtin_va_start (stdarg_p, valist, nextarg) - int stdarg_p ATTRIBUTE_UNUSED; + int stdarg_p; tree valist; rtx nextarg; { tree t; - if (!stdarg_p) - nextarg = plus_constant (nextarg, -UNITS_PER_WORD); + if (! stdarg_p) + { + int align = PARM_BOUNDARY / BITS_PER_UNIT; + int offset = (((UNITS_PER_WORD + align - 1) / align) * align); + nextarg = plus_constant (nextarg, -offset); + } t = build (MODIFY_EXPR, TREE_TYPE (valist), valist, make_tree (ptr_type_node, nextarg)); |