diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-10-16 14:40:27 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-10-16 14:40:27 -0700 |
commit | f6c9e65d4f906d0847ef747595de6495c92b9778 (patch) | |
tree | 2f37e73e9150c1e8699da19baa9b7deaad669216 /nasm.c | |
parent | fab3a6c9de9c56f1db7770c7c5e0271e33455ea2 (diff) | |
download | nasm-f6c9e65d4f906d0847ef747595de6495c92b9778.tar.gz nasm-f6c9e65d4f906d0847ef747595de6495c92b9778.tar.bz2 nasm-f6c9e65d4f906d0847ef747595de6495c92b9778.zip |
Implement floating-point option control directive
New directive [FLOAT] with associated standard macros; allows the
setting to be saved and restored.
Diffstat (limited to 'nasm.c')
-rw-r--r-- | nasm.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -18,6 +18,7 @@ #include "nasm.h" #include "nasmlib.h" +#include "float.h" #include "stdscan.h" #include "insns.h" #include "preproc.h" @@ -822,11 +823,11 @@ static void parse_cmdline(int argc, char **argv) /* List of directives */ enum directives { D_NONE, D_ABSOLUTE, D_BITS, D_COMMON, D_CPU, D_DEBUG, D_DEFAULT, - D_EXTERN, D_GLOBAL, D_LIST, D_SECTION, D_SEGMENT, D_WARNING + D_EXTERN, D_FLOAT, D_GLOBAL, D_LIST, D_SECTION, D_SEGMENT, D_WARNING }; static const char *directives[] = { "", "absolute", "bits", "common", "cpu", "debug", "default", - "extern", "global", "list", "section", "segment", "warning" + "extern", "float", "global", "list", "section", "segment", "warning" }; static enum directives getkw(char **directive, char **value); @@ -1143,6 +1144,13 @@ static void assemble_file(char *fname) err = 1; } break; + case D_FLOAT: + if (float_option(value)) { + report_error(pass1 == 1 ? ERR_NONFATAL : ERR_PANIC, + "unknown 'float' directive: %s", + value); + } + break; default: if (!ofmt->directive(directive, value, pass2)) report_error(pass1 == 1 ? ERR_NONFATAL : ERR_PANIC, @@ -1730,7 +1738,6 @@ static void no_pp_cleanup(int pass) static uint32_t get_cpu(char *value) { - if (!strcmp(value, "8086")) return IF_8086; if (!strcmp(value, "186")) |