int siz = (int)size;
// Try to optimize to MOVEQ
+ // N.B.: We can get away with casting the uint64_t to a 32-bit value
+ // because it checks for a SIZL (i.e., a 32-bit value).
if (CHECK_OPTS(OPT_MOVEL_MOVEQ)
&& (siz == SIZL) && (am0 == IMMED) && (am1 == DREG)
&& ((a0exattr & (TDB | DEFINED)) == DEFINED)
- && (a0exval + 0x80 < 0x100))
+ && ((uint32_t)a0exval + 0x80 < 0x100))
{
m_moveq((WORD)0x7000, (WORD)0);
return error(rel_error);
//}
- v = a0exval - (sloc + 2);
+ v = (uint32_t)a0exval - (sloc + 2);
// Optimize branch instr. size
if (siz == SIZN)
//
int m_movem(WORD inst, WORD siz)
{
- uint32_t eval;
+ uint64_t eval;
WORD i;
WORD w;
WORD rmask;
//
int m_bfop(WORD inst, WORD siz)
{
-
if ((bfval1 > 31) || (bfval1 < 0))
return error("bfxxx offset: immediate value must be between 0 and 31");
bfparam1 = bfval1 << 12;
}
- D_word((inst|am0|a0reg|am1|a1reg));
+ D_word((inst | am0 | a0reg | am1 | a1reg));
ea0gen(siz); // Generate EA
// Second instruction word - Dest register (if exists), Do, Offset, Dw, Width