From 01be58559c021d6f6d8f3fd395ffcff7c8e97224 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Sat, 28 Nov 2015 23:24:20 +0000 Subject: [PATCH] nvptx.h (FIRST_PARM_OFFSET): Add void cast. * config/nvptx/nvptx.h (FIRST_PARM_OFFSET): Add void cast. (FRAME_POINTER_CFA_OFFSET): Define. (struct nvptx_args): Use 'tree' type. (INIT_CUMULATIVE_ARGS): Remove unnecessary do...while. From-SVN: r231038 --- ChangeLog | 7 +++++++ gcc/config/nvptx/nvptx.h | 10 ++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index eb865480d9d..8c38bd55994 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-11-28 Nathan Sidwell + + * config/nvptx/nvptx.h (FIRST_PARM_OFFSET): Add void cast. + (FRAME_POINTER_CFA_OFFSET): Define. + (struct nvptx_args): Use 'tree' type. + (INIT_CUMULATIVE_ARGS): Remove unnecessary do...while. + 2015-11-26 David Edelsohn * m4/libtool.m4 (export_symbols_cmds) [AIX]: Add global TLS "L" diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h index 1789203297c..4228ec073b8 100644 --- a/gcc/config/nvptx/nvptx.h +++ b/gcc/config/nvptx/nvptx.h @@ -166,14 +166,16 @@ enum reg_class #define OUTGOING_ARG_POINTER_REGNUM 11 #define OUTGOING_STATIC_CHAIN_REGNUM 10 -#define FIRST_PARM_OFFSET(FNDECL) 0 +#define FIRST_PARM_OFFSET(FNDECL) ((void)(FNDECL), 0) #define PUSH_ARGS_REVERSED 1 - #define ACCUMULATE_OUTGOING_ARGS 1 +/* Avoid using the argument pointer for frame-related things. */ +#define FRAME_POINTER_CFA_OFFSET(FNDECL) ((void)(FNDECL), 0) + #ifdef HOST_WIDE_INT struct nvptx_args { - union tree_node *fntype; + tree fntype; /* Number of arguments passed in registers so far. */ int count; /* Offset into the stdarg area so far. */ @@ -184,7 +186,7 @@ struct nvptx_args { #define CUMULATIVE_ARGS struct nvptx_args #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \ - do { (CUM).fntype = (FNTYPE); (CUM).count = 0; (CUM).off = 0; } while (0) + ((CUM).fntype = (FNTYPE), (CUM).count = 0, (CUM).off = 0, (void)0) #define FUNCTION_ARG_REGNO_P(r) 0 -- 2.30.2