diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-25 19:24:12 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-25 19:24:12 +0000 |
commit | 80b6664d4e47b4e6f45dc7a84a64062d3cdc6701 (patch) | |
tree | 0a97824aedf48f97f51f1e0d8d3fcd307af86e82 /gcc/tree.c | |
parent | 108beec73e6f9087513651b6d42aa253398d7ba0 (diff) | |
download | gcc-80b6664d4e47b4e6f45dc7a84a64062d3cdc6701.tar.gz |
* tree.c (get_set_constructor_bits,
get_set_constructor_bytes): Remove.
* tree.h: Remove the corresponding prototypes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97057 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/gcc/tree.c b/gcc/tree.c index 1500349ded1..de1ffb21d66 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -5357,99 +5357,6 @@ get_file_function_name (int kind) return get_file_function_name_long (p); } -/* Expand (the constant part of) a SET_TYPE CONSTRUCTOR node. - The result is placed in BUFFER (which has length BIT_SIZE), - with one bit in each char ('\000' or '\001'). - - If the constructor is constant, NULL_TREE is returned. - Otherwise, a TREE_LIST of the non-constant elements is emitted. */ - -tree -get_set_constructor_bits (tree init, char *buffer, int bit_size) -{ - int i; - tree vals; - HOST_WIDE_INT domain_min - = tree_low_cst (TYPE_MIN_VALUE (TYPE_DOMAIN (TREE_TYPE (init))), 0); - tree non_const_bits = NULL_TREE; - - for (i = 0; i < bit_size; i++) - buffer[i] = 0; - - for (vals = TREE_OPERAND (init, 1); - vals != NULL_TREE; vals = TREE_CHAIN (vals)) - { - if (!host_integerp (TREE_VALUE (vals), 0) - || (TREE_PURPOSE (vals) != NULL_TREE - && !host_integerp (TREE_PURPOSE (vals), 0))) - non_const_bits - = tree_cons (TREE_PURPOSE (vals), TREE_VALUE (vals), non_const_bits); - else if (TREE_PURPOSE (vals) != NULL_TREE) - { - /* Set a range of bits to ones. */ - HOST_WIDE_INT lo_index - = tree_low_cst (TREE_PURPOSE (vals), 0) - domain_min; - HOST_WIDE_INT hi_index - = tree_low_cst (TREE_VALUE (vals), 0) - domain_min; - - gcc_assert (lo_index >= 0); - gcc_assert (lo_index < bit_size); - gcc_assert (hi_index >= 0); - gcc_assert (hi_index < bit_size); - for (; lo_index <= hi_index; lo_index++) - buffer[lo_index] = 1; - } - else - { - /* Set a single bit to one. */ - HOST_WIDE_INT index - = tree_low_cst (TREE_VALUE (vals), 0) - domain_min; - if (index < 0 || index >= bit_size) - { - error ("invalid initializer for bit string"); - return NULL_TREE; - } - buffer[index] = 1; - } - } - return non_const_bits; -} - -/* Expand (the constant part of) a SET_TYPE CONSTRUCTOR node. - The result is placed in BUFFER (which is an array of bytes). - If the constructor is constant, NULL_TREE is returned. - Otherwise, a TREE_LIST of the non-constant elements is emitted. */ - -tree -get_set_constructor_bytes (tree init, unsigned char *buffer, int wd_size) -{ - int i; - int set_word_size = BITS_PER_UNIT; - int bit_size = wd_size * set_word_size; - int bit_pos = 0; - unsigned char *bytep = buffer; - char *bit_buffer = alloca (bit_size); - tree non_const_bits = get_set_constructor_bits (init, bit_buffer, bit_size); - - for (i = 0; i < wd_size; i++) - buffer[i] = 0; - - for (i = 0; i < bit_size; i++) - { - if (bit_buffer[i]) - { - if (BYTES_BIG_ENDIAN) - *bytep |= (1 << (set_word_size - 1 - bit_pos)); - else - *bytep |= 1 << bit_pos; - } - bit_pos++; - if (bit_pos >= set_word_size) - bit_pos = 0, bytep++; - } - return non_const_bits; -} - #if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007) /* Complain that the tree code of NODE does not match the expected 0 |