From: ggn Date: Sat, 18 Jul 2020 15:13:49 +0000 (+0300) Subject: In ([bd,An/PC],Xn,od) parsing check for forced .w first and fall back to .l otherwise... X-Git-Tag: v2.1.0~16 X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=commitdiff_plain;h=d812346ecf7309ee3fb88a8dd1f4bca033121ad5;ds=sidebyside In ([bd,An/PC],Xn,od) parsing check for forced .w first and fall back to .l otherwise (worst case .l might get optimised to .w) --- diff --git a/parmode.h b/parmode.h index cd01a4b..549f131 100644 --- a/parmode.h +++ b/parmode.h @@ -616,9 +616,21 @@ CHECKODn: } // ([bd,An/PC],Xn,od) - if (*tok == DOTL) + // Is .W forced here? + if (*tok == DOTW) { - // expr.L + tok++; + // od[.W] + AnEXTEN |= EXT_IISPOSW; // Word outer displacement + AMn = MEMPOST; + } + else + { + // Is .L forced here? + if (*tok == DOTL) + tok++; // Doesn't matter, we're going for .L anyway + + // od.L if (!(AnEXTEN & EXT_BS)) AnEXTEN |= EXT_IISPOSL; // Long outer displacement else @@ -633,14 +645,12 @@ CHECKODn: { AnBEXPR[i] = AnEXPR[i]; i++; - } - while (AnEXPR[i] != 'E'); + } while (AnEXPR[i] != 'E'); AnBEXPR[i] = 'E'; } AMn = MEMPOST; - tok++; // Defined, absolute values from $FFFF8000..$00007FFF get // optimized to absolute short @@ -653,17 +663,6 @@ CHECKODn: if (optim_warn_flag) warn("absolute value in outer displacement ranging $FFFF8000..$00007FFF optimised to absolute short"); } - - } - else - { - // expr[.W] - AnEXTEN |= EXT_IISPOSW; // Word outer displacement - AMn = MEMPOST; - - // Is .W forced here? - if (*tok == DOTW) - tok++; } // Check for final closing parenthesis