/* Non-zero to quieten some warnings. */
static int quiet_warnings = 0;
+/* Guard to avoid repeated warnings about non-16-bit code on 16-bit CPUs. */
+static bool pre_386_16bit_warned;
+
/* CPU name. */
static const char *cpu_arch_name = NULL;
static char *cpu_sub_arch_name = NULL;
cpu_arch_tune = cpu_arch_isa;
cpu_arch_tune_flags = cpu_arch_isa_flags;
}
+ pre_386_16bit_warned = false;
break;
}
{
supported |= cpu_flags_match (t);
if (supported == CPU_FLAGS_PERFECT_MATCH)
- {
- if (!cpu_arch_flags.bitfield.cpui386 && (flag_code != CODE_16BIT))
- as_warn (_("use .code16 to ensure correct addressing mode"));
-
- return l;
- }
+ return l;
}
if (!(supported & CPU_FLAGS_64BIT_MATCH))
fragP->tc_frag_data.max_bytes = max_branch_padding_size;
}
+ if (!cpu_arch_flags.bitfield.cpui386 && (flag_code != CODE_16BIT)
+ && !pre_386_16bit_warned)
+ {
+ as_warn (_("use .code16 to ensure correct addressing mode"));
+ pre_386_16bit_warned = true;
+ }
+
/* Output jumps. */
if (i.tm.opcode_modifier.jump == JUMP)
output_branch ();