diff options
author | Richard Sandiford <rsandifo@gcc.gnu.org> | 2006-01-25 09:10:56 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2006-01-25 09:10:56 +0000 |
commit | c185c79706795682a35d3b15df2ff3b7e1f2138b (patch) | |
tree | 9ec01d7044846a0ba35c49e3628382ad19db08d7 /gcc/rtl.h | |
parent | 14c1a9d75ed4be5d79d3cc47cd49dfba36bd9967 (diff) | |
download | gcc-c185c79706795682a35d3b15df2ff3b7e1f2138b.zip gcc-c185c79706795682a35d3b15df2ff3b7e1f2138b.tar.gz gcc-c185c79706795682a35d3b15df2ff3b7e1f2138b.tar.bz2 |
rtl.texi (SYMBOL_REF_CONSTANT, [...]): Document.
* doc/rtl.texi (SYMBOL_REF_CONSTANT, SYMBOL_REF_DATA): Document.
* gengtype.c (adjust_field_rtx_def): Garbage-collect field 2 of
a SYMBOL_REF as either a tree or a constant_descriptor_rtx,
depending on the value of CONSTANT_POOL_ADDRESS_P.
* optabs.c (init_one_libfunc): Nullify SYMBOL_REF_DATA rather than
SYMBOL_REF_DECL.
* varasm.c (make_decl_rtl, build_constant_desc): Set SYMBOL_REF_DATA
rather than SYMBOL_REF_DECL.
(rtx_constant_pool): Remove const_rtx_sym_htab.
(const_desc_rtx_sym_hash, const_desc_rtx_sym_eq): Delete.
(init_varasm_status): Don't initialize const_rtx_sym_htab.
(force_const_mem): Point SYMBOL_REF_DATA to the constant pool entry.
Remove handling of const_rtx_sym_htab.
(find_pool_constant): Delete.
(get_pool_constant, get_pool_constant_mark): Use SYMBOL_REF_CONSTANT
rather than find_pool_constant.
(get_pool_constant_for_function): Delete.
(get_pool_mode, mark_constant): Use SYMBOL_REF_CONSTANT rather than
find_pool_constant.
* rtl.h (rtunion_def): Add rt_constant and rt_ptr fields.
(X0CONSTANT, X0PTR, SYMBOL_REF_DATA): New macros.
(SYMBOL_REF_DECL): Return NULL if CONSTANT_POOL_ADDRESS_P.
(SYMBOL_REF_CONSTANT): New macro.
(get_pool_constant_for_function): Delete.
* config/i386/winnt.c (i386_pe_mark_dllexport): Set SYMBOL_REF_DATA
rather than SYMBOL_REF_DECL.
(i386_pe_mark_dllimport): Likewise.
* config/rs6000/rs6000.c (rs6000_emit_move): Copy SYMBOL_REF_DATA
rather than SYMBOL_REF_DECL.
* config/darwin.c (machopic_indirect_data_reference): Likewise.
(machopic_indirect_call_target): Likewise.
From-SVN: r110210
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r-- | gcc/rtl.h | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -171,6 +171,8 @@ union rtunion_def struct basic_block_def *rt_bb; mem_attrs *rt_mem; reg_attrs *rt_reg; + struct constant_descriptor_rtx *rt_constant; + void *rt_ptr; }; typedef union rtunion_def rtunion; @@ -630,6 +632,8 @@ extern void rtl_check_failed_flag (const char *, rtx, const char *, #define X0CSELIB(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_cselib) #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') @@ -1193,8 +1197,17 @@ do { \ #define SYMBOL_REF_WEAK(RTX) \ (RTL_FLAG_CHECK1("SYMBOL_REF_WEAK", (RTX), SYMBOL_REF)->return_val) +/* A pointer attached to the SYMBOL_REF; either SYMBOL_REF_DECL or + SYMBOL_REF_CONSTANT. */ +#define SYMBOL_REF_DATA(RTX) X0PTR ((RTX), 2) + /* The tree (decl or constant) associated with the symbol, or null. */ -#define SYMBOL_REF_DECL(RTX) X0TREE ((RTX), 2) +#define SYMBOL_REF_DECL(RTX) \ + (CONSTANT_POOL_ADDRESS_P (RTX) ? NULL : X0TREE ((RTX), 2)) + +/* The rtx constant pool entry for a symbol, or null. */ +#define SYMBOL_REF_CONSTANT(RTX) \ + (CONSTANT_POOL_ADDRESS_P (RTX) ? X0CONSTANT ((RTX), 2) : NULL) /* A set of flags on a symbol_ref that are, in some respects, redundant with information derivable from the tree decl associated with this symbol. @@ -1417,7 +1430,6 @@ struct function; extern rtx get_pool_constant (rtx); extern rtx get_pool_constant_mark (rtx, bool *); extern enum machine_mode get_pool_mode (rtx); -extern rtx get_pool_constant_for_function (struct function *, rtx); extern rtx simplify_subtraction (rtx); /* In function.c */ |