diff options
author | Ian Lance Taylor <iant@google.com> | 2009-06-19 17:56:01 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2009-06-19 17:56:01 +0000 |
commit | d4aa4f4b78fd35f3005943ee7a59468660504337 (patch) | |
tree | 296149cfc20b545876f5462a5da72b630a3c511b /gcc | |
parent | 9b88236b3440aacc4f3e0d1ef36bcf680fc04a4a (diff) | |
download | gcc-d4aa4f4b78fd35f3005943ee7a59468660504337.zip gcc-d4aa4f4b78fd35f3005943ee7a59468660504337.tar.gz gcc-d4aa4f4b78fd35f3005943ee7a59468660504337.tar.bz2 |
i386.c (ix86_function_specific_save): Test that fields match values...
* config/i386/i386.c (ix86_function_specific_save): Test that
fields match values, rather than testing the values are in a
certain range.
From-SVN: r148721
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 14 |
2 files changed, 14 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f4e7816..695547c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-06-19 Ian Lance Taylor <iant@google.com> + + * config/i386/i386.c (ix86_function_specific_save): Test that + fields match values, rather than testing the values are in a + certain range. + 2009-06-19 Richard Guenther <rguenther@suse.de> * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Handle diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 61774cc0..06ae734 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3424,12 +3424,6 @@ override_options (bool main_args_p) static void ix86_function_specific_save (struct cl_target_option *ptr) { - gcc_assert (IN_RANGE (ix86_arch, 0, 255)); - gcc_assert (IN_RANGE (ix86_schedule, 0, 255)); - gcc_assert (IN_RANGE (ix86_tune, 0, 255)); - gcc_assert (IN_RANGE (ix86_fpmath, 0, 255)); - gcc_assert (IN_RANGE (ix86_branch_cost, 0, 255)); - ptr->arch = ix86_arch; ptr->schedule = ix86_schedule; ptr->tune = ix86_tune; @@ -3439,6 +3433,14 @@ ix86_function_specific_save (struct cl_target_option *ptr) ptr->arch_specified = ix86_arch_specified; ptr->ix86_isa_flags_explicit = ix86_isa_flags_explicit; ptr->target_flags_explicit = target_flags_explicit; + + /* The fields are char but the variables are not; make sure the + values fit in the fields. */ + gcc_assert (ptr->arch == ix86_arch); + gcc_assert (ptr->schedule == ix86_schedule); + gcc_assert (ptr->tune == ix86_tune); + gcc_assert (ptr->fpmath == ix86_fpmath); + gcc_assert (ptr->branch_cost == ix86_branch_cost); } /* Restore the current options */ |