aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/sh
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-08-20 08:51:09 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-08-20 08:51:09 +0000
commit4f53599cb5b822cd7f95997861c2e064977ecb6a (patch)
tree9bd3f242894091d3344f3c78727d09c0f031167d /gcc/config/sh
parentfde65a89fad742c2dca8ad50452e482d22f3c1b2 (diff)
downloadgcc-4f53599cb5b822cd7f95997861c2e064977ecb6a.zip
gcc-4f53599cb5b822cd7f95997861c2e064977ecb6a.tar.gz
gcc-4f53599cb5b822cd7f95997861c2e064977ecb6a.tar.bz2
Add must_pass_va_arg_in_stack
This patch splits out another idiom from the va_arg gimplification routines, so that there's only one place to update later. 2019-08-20 Richard Sandiford <richard.sandiford@arm.com> gcc/ * calls.h (must_pass_va_arg_in_stack): Declare. * calls.c (must_pass_va_arg_in_stack): New function. * config/alpha/alpha.c (alpha_gimplify_va_arg_1): Use it. * config/sh/sh.c (sh_gimplify_va_arg_expr): Likewise. * config/stormy16/stormy16.c (xstormy16_gimplify_va_arg_expr): Likewise. * config/xtensa/xtensa.c (xtensa_gimplify_va_arg_expr): Likewise. From-SVN: r274696
Diffstat (limited to 'gcc/config/sh')
-rw-r--r--gcc/config/sh/sh.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index e44e46d..ab01809 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -7656,9 +7656,8 @@ sh_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
tree addr, lab_over = NULL, result = NULL;
tree eff_type;
- const bool pass_by_ref =
- !VOID_TYPE_P (type)
- && targetm.calls.must_pass_in_stack (TYPE_MODE (type), type);
+ const bool pass_by_ref
+ = !VOID_TYPE_P (type) && must_pass_va_arg_in_stack (type);
if (pass_by_ref)
type = build_pointer_type (type);