if (tdb)
MarkRelocatable(cursect, sloc, tdb, MWORD, NULL);
- if ((v == 0) && optim_flags[OPT_INDIRECT_DISP])
+ if ((v == 0) && optim_flags[OPT_INDIRECT_DISP] && !movep)
{
// If expr is 0, size optimise the opcode. Generally the lower
// 6 bits of the opcode for expr(ax) are 101rrr where rrr=the
return 0;
}
-
+int movep = 0; // Global flag to indicate we're generating a movep instruction
//
// movep Dn, disp(An) -- movep disp(An), Dn
//
int m_movep(WORD inst, WORD siz)
{
+ movep = 1; // Tell ea0gen to lay off the 0(a0) optimisations on this one
if (siz == SIZL)
inst |= 0x0040;
ea0gen(siz);
}
+ movep = 0;
return 0;
}
extern char range_error[];
extern char abs_error[];
extern MNTAB machtab[];
+extern int movep;
#endif // __MACH_H__
" -n Don't do things behind your back in RISC assembler\n"
" -o file Output file name\n"
" +o[value] Turn a specific optimisation on\n"
+ " Available optimisation values and default settings:\n"
+ " o0: Absolute long adddresses to word (on)\n"
+ " o1: move.l #x,dn/an to moveq (on)\n"
+ " o2: Word branches to short (on)\n"
+ " o3: Outer displacement 0(an) to (an) (off)\n"
" ~o[value] Turn a specific optimisation off\n"
" +oall Turn all optimisations on\n"
" ~oall Turn all optimisations off\n"