if (constant_formats[cf].pcrel)
x = SIGNEXTEND (x, constant_formats[cf].nbits);
- ea = (x + constant_formats[cf].offset) << constant_formats[cf].scale;
+ ea = x + constant_formats[cf].offset;
+ ea = ea << constant_formats[cf].scale;
if (constant_formats[cf].pcrel)
ea += pc;
{
int nb = constant_formats[cf].nbits + 1;
- x = x | (1 << constant_formats[cf].nbits);
+ x = x | (1ul << constant_formats[cf].nbits);
x = SIGNEXTEND (x, nb);
}
else if (constant_formats[cf].issigned)
x = SIGNEXTEND (x, constant_formats[cf].nbits);
- if (constant_formats[cf].offset)
- x += constant_formats[cf].offset;
-
- if (constant_formats[cf].scale)
- x <<= constant_formats[cf].scale;
+ x += constant_formats[cf].offset;
+ x = (unsigned long) x << constant_formats[cf].scale;
if (constant_formats[cf].decimal)
sprintf (buf, "%*li", constant_formats[cf].leading, x);
if (constant_formats[cf].pcrel)
x = SIGNEXTEND (x, constant_formats[cf].nbits);
- ea = (x + constant_formats[cf].offset) << constant_formats[cf].scale;
+ ea = x + constant_formats[cf].offset;
+ ea = ea << constant_formats[cf].scale;
if (constant_formats[cf].pcrel)
ea += pc;
if (constant_formats[cf].negative)
{
int nb = constant_formats[cf].nbits + 1;
- x = x | (1u << constant_formats[cf].nbits);
+ x = x | (1ul << constant_formats[cf].nbits);
x = SIGNEXTEND (x, nb);
}
else if (constant_formats[cf].issigned)