aboutsummaryrefslogtreecommitdiff
path: root/gdb/ax-gdb.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-09-14 11:07:57 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-09-14 11:07:57 -0400
commitc6d940a9569deb4a89a5628caa78b1ccfcfd2bdf (patch)
treec5d25c2c2cd369f74ed393926638302e9da95c02 /gdb/ax-gdb.c
parent653223d3561b5976d12ade101113af9d08348b8c (diff)
downloadgdb-c6d940a9569deb4a89a5628caa78b1ccfcfd2bdf.zip
gdb-c6d940a9569deb4a89a5628caa78b1ccfcfd2bdf.tar.gz
gdb-c6d940a9569deb4a89a5628caa78b1ccfcfd2bdf.tar.bz2
gdb: remove TYPE_UNSIGNED
gdb/ChangeLog: * gdbtypes.h (TYPE_UNSIGNED): Remove, replace all uses with type::is_unsigned. Change-Id: I84f76f5cd44ff7294e421d317376a9e476bc8666
Diffstat (limited to 'gdb/ax-gdb.c')
-rw-r--r--gdb/ax-gdb.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index 34e22b2..78272f7 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -444,7 +444,7 @@ static void
gen_sign_extend (struct agent_expr *ax, struct type *type)
{
/* Do we need to sign-extend this? */
- if (!TYPE_UNSIGNED (type))
+ if (!type->is_unsigned ())
ax_ext (ax, TYPE_LENGTH (type) * TARGET_CHAR_BIT);
}
@@ -458,7 +458,7 @@ gen_extend (struct agent_expr *ax, struct type *type)
int bits = TYPE_LENGTH (type) * TARGET_CHAR_BIT;
/* I just had to. */
- ((TYPE_UNSIGNED (type) ? ax_zero_ext : ax_ext) (ax, bits));
+ ((type->is_unsigned () ? ax_zero_ext : ax_ext) (ax, bits));
}
@@ -871,8 +871,8 @@ type_wider_than (struct type *type1, struct type *type2)
{
return (TYPE_LENGTH (type1) > TYPE_LENGTH (type2)
|| (TYPE_LENGTH (type1) == TYPE_LENGTH (type2)
- && TYPE_UNSIGNED (type1)
- && !TYPE_UNSIGNED (type2)));
+ && type1->is_unsigned ()
+ && !type2->is_unsigned ()));
}
@@ -899,7 +899,7 @@ gen_conversion (struct agent_expr *ax, struct type *from, struct type *to)
then we need to extend. */
else if (TYPE_LENGTH (to) == TYPE_LENGTH (from))
{
- if (TYPE_UNSIGNED (from) != TYPE_UNSIGNED (to))
+ if (from->is_unsigned () != to->is_unsigned ())
gen_extend (ax, to);
}
@@ -907,7 +907,7 @@ gen_conversion (struct agent_expr *ax, struct type *from, struct type *to)
we need to zero out any possible sign bits. */
else if (TYPE_LENGTH (to) > TYPE_LENGTH (from))
{
- if (TYPE_UNSIGNED (to))
+ if (to->is_unsigned ())
gen_extend (ax, to);
}
}
@@ -1162,8 +1162,7 @@ gen_binop (struct agent_expr *ax, struct axs_value *value,
|| (value2->type->code () != TYPE_CODE_INT))
error (_("Invalid combination of types in %s."), name);
- ax_simple (ax,
- TYPE_UNSIGNED (value1->type) ? op_unsigned : op);
+ ax_simple (ax, value1->type->is_unsigned () ? op_unsigned : op);
if (may_carry)
gen_extend (ax, value1->type); /* catch overflow */
value->type = value1->type;
@@ -1399,7 +1398,7 @@ gen_bitfield_ref (struct agent_expr *ax, struct axs_value *value,
ax_simple (ax, aop_bit_or);
/* Sign- or zero-extend the value as appropriate. */
- ((TYPE_UNSIGNED (type) ? ax_zero_ext : ax_ext) (ax, end - start));
+ ((type->is_unsigned () ? ax_zero_ext : ax_ext) (ax, end - start));
/* This is *not* an lvalue. Ugh. */
value->kind = axs_rvalue;