aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 381d5f0..826327e 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -2321,11 +2321,9 @@ tree
bit_position (field)
tree field;
{
- return size_binop (PLUS_EXPR, DECL_FIELD_BIT_OFFSET (field),
- size_binop (MULT_EXPR,
- convert (bitsizetype,
- DECL_FIELD_OFFSET (field)),
- bitsize_unit_node));
+
+ return bit_from_pos (DECL_FIELD_OFFSET (field),
+ DECL_FIELD_BIT_OFFSET (field));
}
/* Likewise, but return as an integer. Abort if it cannot be represented
@@ -2346,11 +2344,8 @@ tree
byte_position (field)
tree field;
{
- return size_binop (PLUS_EXPR, DECL_FIELD_OFFSET (field),
- convert (sizetype,
- size_binop (FLOOR_DIV_EXPR,
- DECL_FIELD_BIT_OFFSET (field),
- bitsize_unit_node)));
+ return byte_from_pos (DECL_FIELD_OFFSET (field),
+ DECL_FIELD_BIT_OFFSET (field));
}
/* Likewise, but return as an integer. Abort if it cannot be represented