diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-23 23:32:54 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-23 23:32:54 +0000 |
commit | 5fcf082c9b422c43e42ae88d7e5479a3a630b1c9 (patch) | |
tree | a2207e94c4695b5f74f948b92d008cdbb2f0f16c /gcc/opth-gen.awk | |
parent | f68344e7c9b22713d613e7eaf53e471eabc8658a (diff) | |
download | gcc-5fcf082c9b422c43e42ae88d7e5479a3a630b1c9.tar.gz |
Check if MASK_/TARGET_ macros defined for extra_masks
2012-04-23 H.J. Lu <hongjiu.lu@intel.com>
PR bootstrap/52878
* opth-gen.awk: Check if MASK_ and TARGET_ macros are defined for
extra_masks.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186729 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/opth-gen.awk')
-rw-r--r-- | gcc/opth-gen.awk | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/opth-gen.awk b/gcc/opth-gen.awk index 9a7b6c385f8..a600b30502b 100644 --- a/gcc/opth-gen.awk +++ b/gcc/opth-gen.awk @@ -314,12 +314,14 @@ for (i = 0; i < n_opts; i++) { mask = "OPTION_MASK_" if (host_wide_int[vname] == "yes") mask_1 = "HOST_WIDE_INT_1" - } + } else + extra_mask_bits[name] = 1 print "#define " mask name " (" mask_1 " << " masknum[vname]++ ")" } } for (i = 0; i < n_extra_masks; i++) { - print "#define MASK_" extra_masks[i] " (1 << " masknum[""]++ ")" + if (extra_mask_bits[extra_masks[i]] == 0) + print "#define MASK_" extra_masks[i] " (1 << " masknum[""]++ ")" } for (var in masknum) { @@ -355,14 +357,16 @@ for (i = 0; i < n_opts; i++) { vname = "target_flags" macro = "TARGET_" mask = "MASK_" + extra_mask_macros[name] = 1 } print "#define " macro name \ " ((" vname " & " mask name ") != 0)" } } for (i = 0; i < n_extra_masks; i++) { - print "#define TARGET_" extra_masks[i] \ - " ((target_flags & MASK_" extra_masks[i] ") != 0)" + if (extra_mask_macros[extra_masks[i]] == 0) + print "#define TARGET_" extra_masks[i] \ + " ((target_flags & MASK_" extra_masks[i] ") != 0)" } print "" |