+2019-12-26 Alan Modra <amodra@gmail.com>
+
+ * v850-dis.c (disassemble): Avoid signed overflow. Don't use
+ long vars when unsigned int will do.
+
2019-12-24 Alan Modra <amodra@gmail.com>
* arm-dis.c (print_insn_arm): Don't shift by 32 on unsigned int var.
0, 0, 0, 0, 0, 31, 29, 28, 23, 22, 21, 20, 27, 26, 25, 24 };
int *regs;
int i;
- unsigned long int mask = 0;
+ unsigned int mask = 0;
int pc = 0;
switch (operand->shift)
for (i = 0; i < 32; i++)
{
- if (value & (1 << i))
+ if (value & (1u << i))
{
switch (regs[ i ])
{
default:
- mask |= (1 << regs[ i ]);
+ mask |= (1u << regs[ i ]);
break;
case 0:
/* xgettext:c-format */
int shown_one = 0;
for (bit = 0; bit < 32; bit++)
- if (mask & (1 << bit))
+ if (mask & (1u << bit))
{
- unsigned long int first = bit;
- unsigned long int last;
+ unsigned int first = bit;
+ unsigned int last;
if (shown_one)
info->fprintf_func (info->stream, ", ");
info->fprintf_func (info->stream, "%s", get_v850_reg_name (first));
for (bit++; bit < 32; bit++)
- if ((mask & (1 << bit)) == 0)
+ if ((mask & (1u << bit)) == 0)
break;
last = bit;