From 929e5e5b5d1dcc5de28ab486605c889dc879ab20 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Fri, 27 Jan 2006 16:17:39 +0000 Subject: rtl.texi (SYMBOL_REF_DATA): Adjust documentation for new opaque type. * doc/rtl.texi (SYMBOL_REF_DATA): Adjust documentation for new opaque type. * optabs.c (init_one_libfunc): Use SET_SYMBOL_REF_DECL. * varasm.c (make_decl_rtl, build_constant_desc): Likewise. (force_const_mem): Use SET_SYMBOL_REF_CONSTANT. * rtl.h (rtunion_def): Remove rt_ptr. (X0PTR): Delete. (SYMBOL_REF_DATA): Use X0ANY instead of X0PTR. (SET_SYMBOL_REF_DECL, SET_SYMBOL_REF_CONSTANT): New macros. * config/i386/winnt.c (i386_pe_mark_dllexport) (i386_pe_mark_dllimport): Use SET_SYMBOL_REF_DECL. From-SVN: r110300 --- gcc/rtl.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'gcc/rtl.h') diff --git a/gcc/rtl.h b/gcc/rtl.h index 8a959b8..250f383 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -172,7 +172,6 @@ union rtunion_def mem_attrs *rt_mem; reg_attrs *rt_reg; struct constant_descriptor_rtx *rt_constant; - void *rt_ptr; }; typedef union rtunion_def rtunion; @@ -633,7 +632,6 @@ extern void rtl_check_failed_flag (const char *, rtx, const char *, #define X0MEMATTR(RTX, N) (RTL_CHECKC1 (RTX, N, MEM).rt_mem) #define X0REGATTR(RTX, N) (RTL_CHECKC1 (RTX, N, REG).rt_reg) #define X0CONSTANT(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_constant) -#define X0PTR(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_ptr) /* Access a '0' field with any type. */ #define X0ANY(RTX, N) RTL_CHECK1 (RTX, N, '0') @@ -1199,12 +1197,21 @@ do { \ /* A pointer attached to the SYMBOL_REF; either SYMBOL_REF_DECL or SYMBOL_REF_CONSTANT. */ -#define SYMBOL_REF_DATA(RTX) X0PTR ((RTX), 2) +#define SYMBOL_REF_DATA(RTX) X0ANY ((RTX), 2) + +/* Set RTX's SYMBOL_REF_DECL to DECL. RTX must not be a constant + pool symbol. */ +#define SET_SYMBOL_REF_DECL(RTX, DECL) \ + (gcc_assert (!CONSTANT_POOL_ADDRESS_P (RTX)), X0TREE ((RTX), 2) = (DECL)) /* The tree (decl or constant) associated with the symbol, or null. */ #define SYMBOL_REF_DECL(RTX) \ (CONSTANT_POOL_ADDRESS_P (RTX) ? NULL : X0TREE ((RTX), 2)) +/* Set RTX's SYMBOL_REF_CONSTANT to C. RTX must be a constant pool symbol. */ +#define SET_SYMBOL_REF_CONSTANT(RTX, C) \ + (gcc_assert (CONSTANT_POOL_ADDRESS_P (RTX)), X0CONSTANT ((RTX), 2) = (C)) + /* The rtx constant pool entry for a symbol, or null. */ #define SYMBOL_REF_CONSTANT(RTX) \ (CONSTANT_POOL_ADDRESS_P (RTX) ? X0CONSTANT ((RTX), 2) : NULL) -- cgit v1.1