/*@null@*/ /*@dependent@*/ static const yasm_listfmt_module *
cur_listfmt_module = NULL;
static int preproc_only = 0;
+static unsigned int force_strict = 0;
static int generate_make_dependencies = 0;
static int warning_error = 0; /* warnings being treated as errors */
static enum {
static int opt_listfile_handler(char *cmd, /*@null@*/ char *param, int extra);
static int opt_objfile_handler(char *cmd, /*@null@*/ char *param, int extra);
static int opt_machine_handler(char *cmd, /*@null@*/ char *param, int extra);
+static int opt_strict_handler(char *cmd, /*@null@*/ char *param, int extra);
static int opt_warning_handler(char *cmd, /*@null@*/ char *param, int extra);
static int preproc_only_handler(char *cmd, /*@null@*/ char *param, int extra);
static int opt_include_option(char *cmd, /*@null@*/ char *param, int extra);
N_("name of object-file output"), N_("filename") },
{ 'm', "machine", 1, opt_machine_handler, 0,
N_("select machine (list with -m help)"), N_("machine") },
+ { 0, "force-strict", 0, opt_strict_handler, 0,
+ N_("treat all sized operands as if `strict' was used"), NULL },
{ 'w', NULL, 0, opt_warning_handler, 1,
N_("inhibits warning messages"), NULL },
{ 'W', NULL, 0, opt_warning_handler, 0,
cur_objfmt_module->default_x86_mode_bits);
}
+ yasm_arch_set_var(cur_arch, "force_strict", force_strict);
+
/* Parse! */
cur_parser_module->do_parse(object, cur_preproc, cur_arch, cur_objfmt,
cur_dbgfmt, in, in_filename,
return 0;
}
+static int
+opt_strict_handler(/*@unused@*/ char *cmd,
+ /*@unused@*/ /*@null@*/ char *param,
+ /*@unused@*/ int extra)
+{
+ force_strict = 1;
+ return 0;
+}
+
static int
opt_warning_handler(char *cmd, /*@unused@*/ char *param, int extra)
{
arch_x86->cpu_enabled = ~CPU_Any;
arch_x86->amd64_machine = amd64_machine;
arch_x86->mode_bits = 0;
+ arch_x86->force_strict = 0;
if (yasm__strcasecmp(parser, "nasm") == 0)
arch_x86->parser = X86_PARSER_NASM;
yasm_arch_x86 *arch_x86 = (yasm_arch_x86 *)arch;
if (yasm__strcasecmp(var, "mode_bits") == 0)
arch_x86->mode_bits = val;
+ else if (yasm__strcasecmp(var, "force_strict") == 0)
+ arch_x86->force_strict = val;
else
return 1;
return 0;