diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1997-08-02 13:17:40 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1997-08-02 13:17:40 -0400 |
commit | 99b5da08231e335507fec1aa62914c5882a5f4ef (patch) | |
tree | 291613c5de5f9cb28864fc9e9e39031f41b14c34 /gcc/expr.h | |
parent | 921b3427bc1eba4170b054b3a03e97f0ec590878 (diff) | |
download | gcc-99b5da08231e335507fec1aa62914c5882a5f4ef.zip gcc-99b5da08231e335507fec1aa62914c5882a5f4ef.tar.gz gcc-99b5da08231e335507fec1aa62914c5882a5f4ef.tar.bz2 |
Add expand_modifier flags.
(chkr_*_libfunc): New decls.
(memory_use_mode): New declaration.
From-SVN: r14612
Diffstat (limited to 'gcc/expr.h')
-rw-r--r-- | gcc/expr.h | 30 |
1 files changed, 27 insertions, 3 deletions
@@ -45,9 +45,27 @@ Boston, MA 02111-1307, USA. */ EXPAND_SUM means it is ok to return a PLUS rtx or MULT rtx. EXPAND_INITIALIZER is similar but also record any labels on forced_labels. EXPAND_CONST_ADDRESS means it is ok to return a MEM whose address - is a constant that is not a legitimate address. */ + is a constant that is not a legitimate address. + EXPAND_MEMORY_USE_* are explained below. */ enum expand_modifier {EXPAND_NORMAL, EXPAND_SUM, - EXPAND_CONST_ADDRESS, EXPAND_INITIALIZER}; + EXPAND_CONST_ADDRESS, EXPAND_INITIALIZER, + EXPAND_MEMORY_USE_WO, EXPAND_MEMORY_USE_RW, + EXPAND_MEMORY_USE_BAD, EXPAND_MEMORY_USE_DONT}; + +/* Argument for chkr_* functions. + MEMORY_USE_RO: the pointer reads memory. + MEMORY_USE_WO: the pointer writes to memory. + MEMORY_USE_RW: the pointer modifies memory (ie it reads and writes). An + example is (*ptr)++ + MEMORY_USE_BAD: use this if you don't know the behavior of the pointer, or + if you know there are no pointers. Using an INDIRECT_REF + with MEMORY_USE_BAD will abort. + MEMORY_USE_TW: just test for writing, without update. Special. + MEMORY_USE_DONT: the memory is neither read nor written. This is used by + '->' and '.'. */ +enum memory_use_mode {MEMORY_USE_BAD = 0, MEMORY_USE_RO = 1, + MEMORY_USE_WO = 2, MEMORY_USE_RW = 3, + MEMORY_USE_TW = 6, MEMORY_USE_DONT = 99}; /* List of labels that must never be deleted. */ extern rtx forced_labels; @@ -150,7 +168,7 @@ struct args_size ((SIZE).var == 0 ? GEN_INT ((SIZE).constant) \ : expand_expr (size_binop (PLUS_EXPR, (SIZE).var, \ size_int ((SIZE).constant)), \ - NULL_RTX, VOIDmode, 0)) + NULL_RTX, VOIDmode, EXPAND_MEMORY_USE_BAD)) /* Convert the implicit sum in a `struct args_size' into a tree. */ #define ARGS_SIZE_TREE(SIZE) \ @@ -482,6 +500,12 @@ extern rtx fixunsxfti_libfunc; extern rtx fixunstfsi_libfunc; extern rtx fixunstfdi_libfunc; extern rtx fixunstfti_libfunc; + +/* For check-memory-usage. */ +extern rtx chkr_check_addr_libfunc; +extern rtx chkr_set_right_libfunc; +extern rtx chkr_copy_bitmap_libfunc; +extern rtx chkr_check_exec_libfunc; typedef rtx (*rtxfun) (); |