From: ggn Date: Sat, 18 Jul 2020 15:26:53 +0000 (+0300) Subject: All size optimisation warnings are hidden by default unless rmac is invoked with... X-Git-Tag: v2.1.0~14 X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=commitdiff_plain;h=56498a111092a0a21ea3279677636c706f67cf74 All size optimisation warnings are hidden by default unless rmac is invoked with '-s' (TODO: add optimisation flag(s) for these) --- diff --git a/dsp56k_amode.c b/dsp56k_amode.c index 7937b10..4e86f36 100644 --- a/dsp56k_amode.c +++ b/dsp56k_amode.c @@ -437,7 +437,8 @@ static inline int dsp_parmode(int *am, int *areg, TOKEN * AnEXPR, uint64_t * AnE { if (*AnEXVAL > 0x3F) { - warn("short addressing mode forced but address is bigger than $3F - switching to long"); + if (optim_warn_flag) + warn("short addressing mode forced but address is bigger than $3F - switching to long"); *am = M_DSPEA; *memspace = 1 << 6; // Mark we're on Y memory space *areg = DSP_EA_ABS; @@ -1609,7 +1610,8 @@ x_gotea1: { if (dspImmedEXVAL > 0x3F) { - warn("short addressing mode forced but address is bigger than $3F - switching to long"); + if (optim_warn_flag) + warn("short addressing mode forced but address is bigger than $3F - switching to long"); force_imm = NUM_FORCE_LONG; deposit_extra_ea = DEPOSIT_EXTRA_WORD; ea1 = DSP_EA_ABS; @@ -1876,7 +1878,8 @@ static inline LONG parse_y(LONG inst, LONG S1, LONG D1, LONG S2) { // We're in 'S1,D1 Y:ea,D2' or 'S1,D1 S1,Y:ea' // there's no Y:aa mode here, so we'll force long - warn("forced short addressing in R:Y mode is not allowed - switching to long"); + if (optim_warn_flag) + warn("forced short addressing in R:Y mode is not allowed - switching to long"); if (expr(dspImmedEXPR, &dspImmedEXVAL, &dspImmedEXATTR, &dspImmedESYM) != OK) return ERROR; @@ -1899,7 +1902,8 @@ static inline LONG parse_y(LONG inst, LONG S1, LONG D1, LONG S2) { if (dspImmedEXVAL > 0xfff) { - warn("short addressing mode forced but address is bigger than $fff - switching to long"); + if (optim_warn_flag) + warn("short addressing mode forced but address is bigger than $fff - switching to long"); ea1 = DSP_EA_ABS; force_imm = NUM_FORCE_LONG; deposit_extra_ea = DEPOSIT_EXTRA_WORD; @@ -2484,7 +2488,8 @@ LONG parmoves(WORD dest) } else { - warn("forced short immediate value doesn't fit in 8 bits - switching to long"); + if (optim_warn_flag) + warn("forced short immediate value doesn't fit in 8 bits - switching to long"); force_imm = NUM_FORCE_LONG; } } @@ -2554,7 +2559,8 @@ deposit_immediate_short_with_register: { // Value's 16 lower bits are not set so the value can fit in a single byte // (check parallel I move quoted above) - warn("Immediate value fits inside 8 bits, so using instruction short format"); + if (optim_warn_flag) + warn("Immediate value fits inside 8 bits, so using instruction short format"); dspImmedEXVAL >>= 16; goto deposit_immediate_short_with_register; } @@ -2563,7 +2569,8 @@ deposit_immediate_short_with_register: { if ((dspImmedEXVAL & 0xFFFF) != 0) { - warn("Immediate value short format forced but value does not fit inside 8 bits - switching to long format"); + if (optim_warn_flag) + warn("Immediate value short format forced but value does not fit inside 8 bits - switching to long format"); goto deposit_immediate_long_with_register; }