#include "arch.h"
+/* FIXME: figure out a better way to handle this */
+extern unsigned char x86_mode_bits;
+
/* Extra path to search for our modules. */
#ifndef YASM_MODULE_PATH_ENV
# define YASM_MODULE_PATH_ENV "YASM_MODULE_PATH"
}
}
- /* Get initial BITS setting from object format */
- /*x86_mode_bits = cur_objfmt->default_mode_bits;*/
+ /* Get initial x86 BITS setting from object format */
+ if (cur_arch == &x86_arch)
+ x86_mode_bits = cur_objfmt->default_x86_mode_bits;
/* Parse! */
sections = cur_parser->do_parse(cur_parser, in, in_filename);
/* default (starting) section name */
const char *default_section_name;
- /* default (starting) BITS setting */
- const unsigned char default_mode_bits;
+ /* default (starting) x86 BITS setting */
+ const unsigned char default_x86_mode_bits;
/* NULL-terminated list of debugging formats that are valid to use with
* this object format.
#include "arch.h"
+/* FIXME: figure out a better way to handle this */
+extern unsigned char x86_mode_bits;
+
/* Extra path to search for our modules. */
#ifndef YASM_MODULE_PATH_ENV
# define YASM_MODULE_PATH_ENV "YASM_MODULE_PATH"
}
}
- /* Get initial BITS setting from object format */
- /*x86_mode_bits = cur_objfmt->default_mode_bits;*/
+ /* Get initial x86 BITS setting from object format */
+ if (cur_arch == &x86_arch)
+ x86_mode_bits = cur_objfmt->default_x86_mode_bits;
/* Parse! */
sections = cur_parser->do_parse(cur_parser, in, in_filename);
/* default (starting) section name */
const char *default_section_name;
- /* default (starting) BITS setting */
- const unsigned char default_mode_bits;
+ /* default (starting) x86 BITS setting */
+ const unsigned char default_x86_mode_bits;
/* NULL-terminated list of debugging formats that are valid to use with
* this object format.