From 4f53599cb5b822cd7f95997861c2e064977ecb6a Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 20 Aug 2019 08:51:09 +0000 Subject: 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 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 --- gcc/calls.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/calls.c') diff --git a/gcc/calls.c b/gcc/calls.c index f49f052..dd428b9 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -5900,5 +5900,14 @@ must_pass_in_stack_var_size_or_pad (machine_mode mode, const_tree type) return false; } +/* Return true if TYPE must be passed on the stack when passed to + the "..." arguments of a function. */ + +bool +must_pass_va_arg_in_stack (tree type) +{ + return targetm.calls.must_pass_in_stack (TYPE_MODE (type), type); +} + /* Tell the garbage collector about GTY markers in this source file. */ #include "gt-calls.h" -- cgit v1.1