//
int m_adda(WORD inst, WORD siz)
{
+ if (a0exattr & DEFINED)
+ {
+ if (CHECK_OPTS(OPT_ADDA_ADDQ))
+ if (a0exval > 1 && a0exval <= 8)
+ // Immediate is between 1 and 8 so let's convert to addq
+ return m_addq(B16(01010000, 00000000), siz);
+ if (CHECK_OPTS(OPT_ADDA_LEA))
+ if (a0exval > 8)
+ {
+ // Immediate is larger than 8 so let's convert to lea
+ am0 = ADISP; // Change addressing mode
+ a0reg = a1reg; // In ADISP a0reg is used instead of a1reg!
+ return m_lea(B16(01000001, 11011000), SIZW);
+ }
+ }
+
inst |= am0 | a0reg | lwsiz_8[siz] | reg_9[a1reg];
D_word(inst);
ea0gen(siz); // Generate EA
if (*tok != EOL)
return error("extra (unexpected) text found");
- // Reject invalud ea modes
+ // Reject invalid ea modes
amsk = amsktab[am0];
if ((amsk & (M_AIND | M_APOSTINC | M_APREDEC | M_ADISP | M_AINDEXED | M_ABSW | M_ABSL | M_ABASE | M_MEMPOST | M_MEMPRE)) == 0)
" o5: Absolute long base displacement to word (off)\n"
" o6: Null branches to NOP (off)\n"
" o7: clr.l Dx to moveq #0,Dx (off)\n"
+ " o8: adda.w/l #x,Dy to addq.w/l #x,Dy (off)\n"
+ " o9: adda.w/l #x,Dy to lea x(Dy),Dy (off)\n"
" ~o[value] Turn a specific optimisation off\n"
" +oall Turn all optimisations on\n"
" ~oall Turn all optimisations off\n"