diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-13 08:47:23 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-13 08:47:23 +0000 |
commit | a93418552df549758ade0d48e9c095056f60ed5e (patch) | |
tree | 6334f5d6c82986a5a8afac7939fe71286f4f8588 /gcc/opth-gen.awk | |
parent | 354bd2823f588b4f4a63c15a1e3bd297825b78f0 (diff) | |
download | gcc-a93418552df549758ade0d48e9c095056f60ed5e.tar.gz |
* optc-gen.awk: Handle stand-alone Mask records.
* opth-gen.awk: Likewise.
* doc/options.texi (Option file format): Document them.
* config.gcc (sparc-*-netbsdelf*, sparc-*-linux*, sparc64-*-freebsd*,
sparc64-*-linux*, sparc64-*-netbsd*): Add long-double-switch.opt.
(sparc64-*-openbsd*, sparc64-*-elf*): Add little-endian.opt.
* config/sparc/sparc.h (MASK_FPU, MASK_UNALIGNED_DOUBLES,
MASK_V8, MASK_SPARCLITE, MASK_SPARCLET, MASK_V9,
MASK_DEPRECATED_V8_INSNS, MASK_IMPURE_TEXT, MASK_APP_REGS,
MASK_HARD_QUAD, MASK_LITTLE_ENDIAN, MASK_PTR64, MASK_64BIT,
MASK_STACK_BIAS, MASK_FPU_SET, MASK_VIS, MASK_V8PLUS,
MASK_FASTER_STRUCTS, MASK_LONG_DOUBLE_128): Delete.
(TARGET_FPU, TARGET_UNALIGNED_DOUBLES, TARGET_V8, TARGET_SPARCLITE,
TARGET_SPARCLET, TARGET_V9, TARGET_DEPRECATED_V8_INSNS,
TARGET_IMPURE_TEXT, TARGET_APP_REGS, MASK_HARD_QUAD,
TARGET_LITTLE_ENDIAN, TARGET_PTR64, TARGET_64BIT, MASK_STACK_BIAS,
TARGET_FPU_SET, TARGET_VIS, TARGET_V8PLUS, TARGET_FASTER_STRUCTS,
TARGET_LONG_DOUBLE_128): Likewise.
(TARGET_SWITCHES, SUBTARGET_SWITCHES): Likewise.
(TARGET_OPTIONS, SUBTARGET_OPTIONS): Likewise.
* config/sparc/freebsd.h (SUBTARGET_SWITCHES): Likewise.
* config/sparc/linux.h (SUBTARGET_SWITCHES): Likewise.
* config/sparc/linux64.h (SUBTARGET_SWITCHES): Likewise.
* config/sparc/netbsd-elf.h (SUBTARGET_SWITCHES): Likewise.
* config/sparc/sp64-elf.h (SUBTARGET_SWITCHES): Likewise.
* config/sparc/sparc.c (fpu_option_set): New global.
(sparc_handle_option): New function.
(sparc_override_options): Test fpu_option_set.
(TARGET_DEFAULT_TARGET_FLAGS): Set to TARGET_DEFAULT.
(TARGET_HANDLE_OPTION): Set to sparc_handle_option.
* config/sparc/sparc.opt: New file.
* config/sparc/little-endian.opt: Likewise.
* config/sparc/long-double-switch.opt: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98078 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/opth-gen.awk')
-rw-r--r-- | gcc/opth-gen.awk | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/gcc/opth-gen.awk b/gcc/opth-gen.awk index d980b12c283..b5a4c578058 100644 --- a/gcc/opth-gen.awk +++ b/gcc/opth-gen.awk @@ -26,7 +26,8 @@ BEGIN { n_opts = 0 n_langs = 0 - quote = "\042" + n_extra_masks = 0 + quote = "\042" comma = "," FS=SUBSEP } @@ -38,10 +39,16 @@ BEGIN { n_langs++; } else { - opts[n_opts] = $1 - flags[n_opts] = $2 - help[n_opts] = $3 - n_opts++; + name = opt_args("Mask", $1) + if (name == "") { + opts[n_opts] = $1 + flags[n_opts] = $2 + help[n_opts] = $3 + n_opts++; + } + else { + extra_masks[n_extra_masks++] = name + } } } @@ -54,6 +61,7 @@ print "#ifndef OPTIONS_H" print "#define OPTIONS_H" print "" print "extern int target_flags;" +print "" for (i = 0; i < n_opts; i++) { name = var_name(flags[i]); @@ -73,6 +81,9 @@ for (i = 0; i < n_opts; i++) { if (name != "" && !flag_set_p("MaskExists", flags[i])) print "#define MASK_" name " (1 << " masknum++ ")" } +for (i = 0; i < n_extra_masks; i++) { + print "#define MASK_" extra_masks[i] " (1 << " masknum++ ")" +} if (masknum > 31) print "#error too many target masks" print "" @@ -83,6 +94,10 @@ for (i = 0; i < n_opts; i++) { print "#define TARGET_" name \ " ((target_flags & MASK_" name ") != 0)" } +for (i = 0; i < n_extra_masks; i++) { + print "#define TARGET_" extra_masks[i] \ + " ((target_flags & MASK_" extra_masks[i] ") != 0)" +} print "" for (i = 0; i < n_opts; i++) { |