diff options
author | Greg McGary <greg@mcgary.org> | 2000-08-30 22:50:52 +0000 |
---|---|---|
committer | Greg McGary <gkm@gcc.gnu.org> | 2000-08-30 22:50:52 +0000 |
commit | 2afaa41c5fdc34be0208be3148f8e83806899f21 (patch) | |
tree | 042ac04f650e870a46a4b967cad55fc6c0fee687 /gcc/tree.h | |
parent | 1d92b3e1d64e84c9a268dceea46a3b1026d32858 (diff) | |
download | gcc-2afaa41c5fdc34be0208be3148f8e83806899f21.zip gcc-2afaa41c5fdc34be0208be3148f8e83806899f21.tar.gz gcc-2afaa41c5fdc34be0208be3148f8e83806899f21.tar.bz2 |
tree.h (struct tree_int_cst): Wrap low and high in a sub-struct.
* tree.h (struct tree_int_cst): Wrap low and high in a sub-struct.
(TREE_INT_CST_LOW, TREE_INT_CST_HIGH): Access through sub-struct.
(TREE_INT_CST): New macro.
* varasm.c (const_hash, compare_constant_1, record_constant_1):
Use new macro TREE_INT_CST.
From-SVN: r36076
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -655,8 +655,9 @@ extern void tree_class_check_failed PARAMS ((const tree, int, If the data type is signed, the value is sign-extended to 2 words even though not all of them may really be in use. In an unsigned constant shorter than 2 words, the extra bits are 0. */ -#define TREE_INT_CST_LOW(NODE) (INTEGER_CST_CHECK (NODE)->int_cst.int_cst_low) -#define TREE_INT_CST_HIGH(NODE) (INTEGER_CST_CHECK (NODE)->int_cst.int_cst_high) +#define TREE_INT_CST(NODE) (INTEGER_CST_CHECK (NODE)->int_cst.int_cst) +#define TREE_INT_CST_LOW(NODE) (TREE_INT_CST (NODE).low) +#define TREE_INT_CST_HIGH(NODE) (TREE_INT_CST (NODE).high) #define INT_CST_LT(A, B) \ (TREE_INT_CST_HIGH (A) < TREE_INT_CST_HIGH (B) \ @@ -675,8 +676,13 @@ struct tree_int_cst struct tree_common common; struct rtx_def *rtl; /* acts as link to register transfer language (rtl) info */ - unsigned HOST_WIDE_INT int_cst_low; - HOST_WIDE_INT int_cst_high; + /* A sub-struct is necessary here because the function `const_hash' + wants to scan both words as a unit and taking the address of the + sub-struct yields the properly inclusive bounded pointer. */ + struct { + unsigned HOST_WIDE_INT low; + HOST_WIDE_INT high; + } int_cst; }; /* In REAL_CST, STRING_CST, COMPLEX_CST nodes, and CONSTRUCTOR nodes, |