summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2005-03-25 19:24:12 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2005-03-25 19:24:12 +0000
commit86f1f8581b02f7f0fc88efb3ea210c9aece12880 (patch)
tree0a97824aedf48f97f51f1e0d8d3fcd307af86e82 /gcc
parentbef87a346c2ebf741fa60ca0c80f8f559551e6e6 (diff)
downloadgcc-86f1f8581b02f7f0fc88efb3ea210c9aece12880.tar.gz
tree.c (get_set_constructor_bits, [...]): Remove.
* tree.c (get_set_constructor_bits, get_set_constructor_bytes): Remove. * tree.h: Remove the corresponding prototypes. From-SVN: r97057
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/tree.c93
-rw-r--r--gcc/tree.h2
3 files changed, 4 insertions, 95 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f968b30ccca..5acc17367d6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -5,6 +5,10 @@
* et-forest.c (et_free_tree_force): New.
* et-forest.h: Add a prototype for et_free_tree_force.
+ * tree.c (get_set_constructor_bits,
+ get_set_constructor_bytes): Remove.
+ * tree.h: Remove the corresponding prototypes.
+
2005-03-25 John David Anglin <dave.anglin@nrc-crnc.gc.ca>
PR target/15491
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
diff --git a/gcc/tree.h b/gcc/tree.h
index 6a96e092d73..bb4f4539b6a 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -3460,8 +3460,6 @@ extern GTY(()) const char * current_function_func_begin_label;
extern unsigned crc32_string (unsigned, const char *);
extern void clean_symbol_name (char *);
extern tree get_file_function_name_long (const char *);
-extern tree get_set_constructor_bits (tree, char *, int);
-extern tree get_set_constructor_bytes (tree, unsigned char *, int);
extern tree get_callee_fndecl (tree);
extern void change_decl_assembler_name (tree, tree);
extern int type_num_arguments (tree);