+2019-12-11 Alan Modra <amodra@gmail.com>
+
+ * cpu-ia64-opc.c (ext_imms_scaled): Avoid undefined left shift
+ of negative values by using unsigned vars.
+
2019-12-07 Alan Modra <amodra@gmail.com>
PR 25236
ia64_insn *valuep, int scale)
{
int i, bits = 0, total = 0;
- BFD_HOST_64_BIT val = 0, sign;
+ BFD_HOST_U_64_BIT val = 0, sign;
for (i = 0; i < NELEMS (self->field) && self->field[i].bits; ++i)
{
total += bits;
}
/* sign extend: */
- sign = (BFD_HOST_64_BIT) 1 << (total - 1);
+ sign = (BFD_HOST_U_64_BIT) 1 << (total - 1);
val = (val ^ sign) - sign;
- *valuep = (val << scale);
+ *valuep = val << scale;
return 0;
}