X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=mach.c;h=08a9bab8f14e78e62ceb76c4813783a108582a88;hp=64061dc4cef46cf97d152b777f97bbdb1207b450;hb=9153334781cd2e23750f4dc002e847606c07a1f0;hpb=0951a3e28907fbaf89a10c5201b71d8080ffe5a8 diff --git a/mach.c b/mach.c index 64061dc..08a9bab 100644 --- a/mach.c +++ b/mach.c @@ -1,7 +1,7 @@ // // RMAC - Reboot's Macro Assembler for all Atari computers // MACH.C - Code Generation -// Copyright (C) 199x Landon Dyer, 2011-2017 Reboot and Friends +// Copyright (C) 199x Landon Dyer, 2011-2018 Reboot and Friends // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986 // Source utilised with the kind permission of Landon Dyer // @@ -1186,10 +1186,14 @@ int m_bfop(WORD inst, WORD siz) //D_word((inst | am0 | a0reg | am1 | a1reg)); if (inst == B16(11101111, 11000000)) + { // bfins special case D_word((inst | am1 | a1reg)); + } else + { D_word((inst | am0 | a0reg)); + } ea0gen(siz); // Generate EA @@ -1656,7 +1660,7 @@ int m_muls(WORD inst, WORD siz) if (flg & 16) { - // OR-in register number + // OR-in register number if (flg & 8) inst |= reg_9[a1reg]; // ea1reg in bits 9..11 else @@ -1685,7 +1689,7 @@ int m_muls(WORD inst, WORD siz) D_word(inst); - // Generate ea0 if requested + // Generate ea0 if requested if (flg & 2) ea0gen(siz); @@ -2908,7 +2912,7 @@ int m_fintrz(WORD inst, WORD siz) if (activefpu == FPU_68040) warn("Instruction is emulated in 68040"); - + return gen_fpu(inst, siz, B8(00000011), FPU_NOWARN); } @@ -3415,7 +3419,7 @@ int m_fsmul(WORD inst, WORD siz) { if (activefpu & (FPU_68040 | FPU_68060)) return gen_fpu(inst, siz, B8(01100011), FPU_NOWARN); - + return error("Unsupported in current FPU"); } @@ -3444,7 +3448,7 @@ int m_fneg(WORD inst, WORD siz) a1reg = a0reg; return gen_fpu(inst, siz, B8(00011010), FPU_NOWARN); } - + return gen_fpu(inst, siz, B8(00011010), FPU_NOWARN); } @@ -3461,7 +3465,7 @@ int m_fsneg(WORD inst, WORD siz) a1reg = a0reg; return gen_fpu(inst, siz, B8(01011010), FPU_NOWARN); } - + return gen_fpu(inst, siz, B8(01011010), FPU_NOWARN); } @@ -3623,7 +3627,7 @@ int m_fsfsqrt(WORD inst, WORD siz) { if (activefpu & (FPU_68040 | FPU_68060)) return gen_fpu(inst, siz, B8(01000001), FPU_NOWARN); - + return error("Unsupported in current FPU"); } @@ -3780,8 +3784,10 @@ int m_lpstop(WORD inst, WORD siz) CHECKNO60; D_word(B16(00000001, 11000000)); - if (a0exattr&DEFINED) + if (a0exattr & DEFINED) + { D_word(a0exval); + } else { AddFixup(FU_WORD, sloc, a0expr);