diff options
author | Kenneth Zadeck <zadeck@naturalbridge.com> | 2014-05-06 16:25:05 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2014-05-06 16:25:05 +0000 |
commit | 807e902eea17f3132488c256c963823976b2348c (patch) | |
tree | e5e1af94eb1502ba893bd6ce4a11f68877ff62a9 /gcc/java/boehm.c | |
parent | 6122336c832dc4dfedc49279549caddce86306ff (diff) | |
download | gcc-807e902eea17f3132488c256c963823976b2348c.zip gcc-807e902eea17f3132488c256c963823976b2348c.tar.gz gcc-807e902eea17f3132488c256c963823976b2348c.tar.bz2 |
Merge in wide-int.
From-SVN: r210113
Diffstat (limited to 'gcc/java/boehm.c')
-rw-r--r-- | gcc/java/boehm.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/java/boehm.c b/gcc/java/boehm.c index ddc424b..191ab86 100644 --- a/gcc/java/boehm.c +++ b/gcc/java/boehm.c @@ -32,8 +32,9 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "java-tree.h" #include "parse.h" #include "diagnostic-core.h" +#include "wide-int.h" -static void mark_reference_fields (tree, double_int *, unsigned int, +static void mark_reference_fields (tree, wide_int *, unsigned int, int *, int *, int *, HOST_WIDE_INT *); /* A procedure-based object descriptor. We know that our @@ -47,7 +48,7 @@ static void mark_reference_fields (tree, double_int *, unsigned int, /* Recursively mark reference fields. */ static void mark_reference_fields (tree field, - double_int *mask, + wide_int *mask, unsigned int ubit, int *pointer_after_end, int *all_bits_set, @@ -107,7 +108,7 @@ mark_reference_fields (tree field, bits for all words in the record. This is conservative, but the size_words != 1 case is impossible in regular java code. */ for (i = 0; i < size_words; ++i) - *mask = (*mask).set_bit (ubit - count - i - 1); + *mask = wi::set_bit (*mask, ubit - count - i - 1); if (count >= ubit - 2) *pointer_after_end = 1; @@ -136,16 +137,15 @@ get_boehm_type_descriptor (tree type) int last_set_index = 0; HOST_WIDE_INT last_view_index = -1; int pointer_after_end = 0; - double_int mask; tree field, value, value_type; - mask = double_int_zero; - /* If the GC wasn't requested, just use a null pointer. */ if (! flag_use_boehm_gc) return null_pointer_node; value_type = java_type_for_mode (ptr_mode, 1); + wide_int mask = wi::zero (TYPE_PRECISION (value_type)); + /* If we have a type of unknown size, use a proc. */ if (int_size_in_bytes (type) == -1) goto procedure_object_descriptor; @@ -194,22 +194,22 @@ get_boehm_type_descriptor (tree type) that we don't have to emit reflection data for run time marking. */ count = 0; - mask = double_int_zero; + mask = wi::zero (TYPE_PRECISION (value_type)); ++last_set_index; while (last_set_index) { if ((last_set_index & 1)) - mask = mask.set_bit (log2_size + count); + mask = wi::set_bit (mask, log2_size + count); last_set_index >>= 1; ++count; } - value = double_int_to_tree (value_type, mask); + value = wide_int_to_tree (value_type, mask); } else if (! pointer_after_end) { /* Bottom two bits for bitmap mark type are 01. */ - mask = mask.set_bit (0); - value = double_int_to_tree (value_type, mask); + mask = wi::set_bit (mask, 0); + value = wide_int_to_tree (value_type, mask); } else { |