diff options
author | Alan Modra <amodra@gmail.com> | 2022-05-27 12:37:21 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-05-27 22:08:59 +0930 |
commit | 0e3c1eebb22e0ade28b619fb41f42d66ed6fb145 (patch) | |
tree | 8a886ac9438d7e9268807c07585eef11a146714d /bfd/cpu-ia64-opc.c | |
parent | aa9b5dbc0f30855aa23034cbd78a1f2025cb9fa9 (diff) | |
download | gdb-0e3c1eebb22e0ade28b619fb41f42d66ed6fb145.zip gdb-0e3c1eebb22e0ade28b619fb41f42d66ed6fb145.tar.gz gdb-0e3c1eebb22e0ade28b619fb41f42d66ed6fb145.tar.bz2 |
Remove use of bfd_uint64_t and similar
Requiring C99 means that uses of bfd_uint64_t can be replaced with
uint64_t, and similarly for bfd_int64_t, BFD_HOST_U_64_BIT, and
BFD_HOST_64_BIT. This patch does that, removes #ifdef BFD_HOST_*
and tidies a few places that print 64-bit values.
Diffstat (limited to 'bfd/cpu-ia64-opc.c')
-rw-r--r-- | bfd/cpu-ia64-opc.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/bfd/cpu-ia64-opc.c b/bfd/cpu-ia64-opc.c index e2b5c26..01e3c3f 100644 --- a/bfd/cpu-ia64-opc.c +++ b/bfd/cpu-ia64-opc.c @@ -99,14 +99,14 @@ ins_immu (const struct ia64_operand *self, ia64_insn value, ia64_insn *code) static const char* ext_immu (const struct ia64_operand *self, ia64_insn code, ia64_insn *valuep) { - BFD_HOST_U_64_BIT value = 0; + uint64_t value = 0; int i, bits = 0, total = 0; for (i = 0; i < NELEMS (self->field) && self->field[i].bits; ++i) { bits = self->field[i].bits; value |= ((code >> self->field[i].shift) - & ((((BFD_HOST_U_64_BIT) 1) << bits) - 1)) << total; + & (((uint64_t) 1 << bits) - 1)) << total; total += bits; } *valuep = value; @@ -161,7 +161,7 @@ static const char* ins_imms_scaled (const struct ia64_operand *self, ia64_insn value, ia64_insn *code, int scale) { - BFD_HOST_64_BIT svalue = value, sign_bit = 0; + int64_t svalue = value, sign_bit = 0; ia64_insn new_insn = 0; int i; @@ -186,17 +186,17 @@ ext_imms_scaled (const struct ia64_operand *self, ia64_insn code, ia64_insn *valuep, int scale) { int i, bits = 0, total = 0; - BFD_HOST_U_64_BIT val = 0, sign; + uint64_t val = 0, sign; for (i = 0; i < NELEMS (self->field) && self->field[i].bits; ++i) { bits = self->field[i].bits; val |= ((code >> self->field[i].shift) - & ((((BFD_HOST_U_64_BIT) 1) << bits) - 1)) << total; + & (((uint64_t) 1 << bits) - 1)) << total; total += bits; } /* sign extend: */ - sign = (BFD_HOST_U_64_BIT) 1 << (total - 1); + sign = (uint64_t) 1 << (total - 1); val = (val ^ sign) - sign; *valuep = val << scale; @@ -312,7 +312,7 @@ static const char* ins_cnt (const struct ia64_operand *self, ia64_insn value, ia64_insn *code) { --value; - if (value >= ((BFD_HOST_U_64_BIT) 1) << self->field[0].bits) + if (value >= (uint64_t) 1 << self->field[0].bits) return "count out of range"; *code |= value << self->field[0].shift; @@ -323,7 +323,7 @@ static const char* ext_cnt (const struct ia64_operand *self, ia64_insn code, ia64_insn *valuep) { *valuep = ((code >> self->field[0].shift) - & ((((BFD_HOST_U_64_BIT) 1) << self->field[0].bits) - 1)) + 1; + & (((uint64_t) 1 << self->field[0].bits) - 1)) + 1; return 0; } @@ -421,8 +421,8 @@ ext_strd5b (const struct ia64_operand *self, ia64_insn code, static const char* ins_inc3 (const struct ia64_operand *self, ia64_insn value, ia64_insn *code) { - BFD_HOST_64_BIT val = value; - BFD_HOST_U_64_BIT sign = 0; + int64_t val = value; + uint64_t sign = 0; if (val < 0) { @@ -444,7 +444,7 @@ ins_inc3 (const struct ia64_operand *self, ia64_insn value, ia64_insn *code) static const char* ext_inc3 (const struct ia64_operand *self, ia64_insn code, ia64_insn *valuep) { - BFD_HOST_64_BIT val; + int64_t val; int negate; val = (code >> self->field[0].shift) & 0x7; |