#include "mntab.h"
// Address-mode information
-int nmodes; // Number of addr'ing modes found
+//int nmodes; // Number of addr'ing modes found
int dsp_am0; // Addressing mode
int dsp_a0reg; // Register
TOKEN dsp_a0expr[EXPRSIZE]; // Expression
WORD dspaaEXATTR; // Expression's attribute
SYM * dspaaESYM; // External symbol involved in expr
+LONG dsp_a0perspace; // Peripheral space (X, Y - used in movep)
+LONG dsp_a1perspace; // Peripheral space (X, Y - used in movep)
+
int dsp_k; // Multiplications sign
static inline LONG checkea(const uint32_t termchar, const int strings);
{
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;
{
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;
{
// 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;
{
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;
}
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;
}
}
{
// 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;
}
{
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;
}