Commit 46d3a873 by Chandrakala Chavva Committed by Chandra Chavva

flags.h: Add new variable flag_single_precision_constant.

        * flags.h : Add new variable flag_single_precision_constant.
        * toplev.c (display_help) : Add -fsingle-precision-constant option.
        (flag_single_precision_constant): New.
        * c-lex.c (yylex): Convert floating point constant to single
        precision constant.
        * invoke.texi : Add documentation for this new option.

From-SVN: r34946
parent 92c26242
2000-07-10 Chandrakala Chavva <cchavva@redhat.com>
* flags.h : Add new variable flag_single_precision_constant.
* toplev.c (display_help) : Add -fsingle-precision-constant option.
(flag_single_precision_constant): New.
* c-lex.c (yylex): Convert floating point constant to single
precision constant.
* invoke.texi : Add documentation for this new option.
2000-07-10 Gabriel Dos Reis <gdr@codesourcery.com> 2000-07-10 Gabriel Dos Reis <gdr@codesourcery.com>
* diagnostic.c (output_octal): Second parameter is unsigned. * diagnostic.c (output_octal): Second parameter is unsigned.
......
...@@ -1176,6 +1176,8 @@ parse_float (data) ...@@ -1176,6 +1176,8 @@ parse_float (data)
else else
{ {
errno = 0; errno = 0;
if (flag_single_precision_constant)
args->type = float_type_node;
if (args->base == 16) if (args->base == 16)
args->value = REAL_VALUE_HTOF (copy, TYPE_MODE (args->type)); args->value = REAL_VALUE_HTOF (copy, TYPE_MODE (args->type));
else else
......
...@@ -379,6 +379,11 @@ extern int flag_schedule_speculative_load_dangerous; ...@@ -379,6 +379,11 @@ extern int flag_schedule_speculative_load_dangerous;
by a cheaper branch, on a count register. */ by a cheaper branch, on a count register. */
extern int flag_branch_on_count_reg; extern int flag_branch_on_count_reg;
/* This option is set to 1 on -fsingle-precision-constant option which is
used to convert the floating point constants to single precision
constants. */
extern int flag_single_precision_constant;
/* Nonzero means put things in delayed-branch slots if supported. */ /* Nonzero means put things in delayed-branch slots if supported. */
......
...@@ -99,7 +99,7 @@ in the following sections. ...@@ -99,7 +99,7 @@ in the following sections.
-ansi -fstd -fallow-single-precision -fcond-mismatch -fno-asm -ansi -fstd -fallow-single-precision -fcond-mismatch -fno-asm
-fno-builtin -ffreestanding -fhosted -fsigned-bitfields -fsigned-char -fno-builtin -ffreestanding -fhosted -fsigned-bitfields -fsigned-char
-funsigned-bitfields -funsigned-char -fwritable-strings -funsigned-bitfields -funsigned-char -fwritable-strings
-traditional -traditional-cpp -trigraphs -traditional -traditional-cpp -trigraphs -fsingle-precision-constant
@end smallexample @end smallexample
@item C++ Language Options @item C++ Language Options
...@@ -178,7 +178,7 @@ in the following sections. ...@@ -178,7 +178,7 @@ in the following sections.
-fregmove -frerun-cse-after-loop -frerun-loop-opt -freduce-all-givs -fregmove -frerun-cse-after-loop -frerun-loop-opt -freduce-all-givs
-fschedule-insns -fschedule-insns2 -fssa -fstrength-reduce -fschedule-insns -fschedule-insns2 -fssa -fstrength-reduce
-fstrict-aliasing -fthread-jumps -funroll-all-loops -fstrict-aliasing -fthread-jumps -funroll-all-loops
-funroll-loops -funroll-loops
-O -O0 -O1 -O2 -O3 -Os -O -O0 -O1 -O2 -O3 -Os
@end smallexample @end smallexample
...@@ -2897,6 +2897,10 @@ the flow graph is translated back from SSA form. (Currently, no ...@@ -2897,6 +2897,10 @@ the flow graph is translated back from SSA form. (Currently, no
SSA-based optimizations are implemented, but converting into and out of SSA-based optimizations are implemented, but converting into and out of
SSA form is not an invariant operation, and generated code may differ.) SSA form is not an invariant operation, and generated code may differ.)
@item -fsingle-precision-constant
Treat floating point constant as single precision constant instead of
implicitly converting it to double precision constant.
@end table @end table
@node Preprocessor Options @node Preprocessor Options
......
...@@ -744,6 +744,8 @@ int flag_schedule_speculative = 1; ...@@ -744,6 +744,8 @@ int flag_schedule_speculative = 1;
int flag_schedule_speculative_load = 0; int flag_schedule_speculative_load = 0;
int flag_schedule_speculative_load_dangerous = 0; int flag_schedule_speculative_load_dangerous = 0;
int flag_single_precision_constant;
/* flag_on_branch_count_reg means try to replace add-1,compare,branch tupple /* flag_on_branch_count_reg means try to replace add-1,compare,branch tupple
by a cheaper branch, on a count register. */ by a cheaper branch, on a count register. */
int flag_branch_on_count_reg; int flag_branch_on_count_reg;
...@@ -1103,7 +1105,9 @@ lang_independent_options f_options[] = ...@@ -1103,7 +1105,9 @@ lang_independent_options f_options[] =
{"bounded-pointers", &flag_bounded_pointers, 1, {"bounded-pointers", &flag_bounded_pointers, 1,
"Compile pointers as triples: value, base & end" }, "Compile pointers as triples: value, base & end" },
{"bounds-check", &flag_bounds_check, 1, {"bounds-check", &flag_bounds_check, 1,
"Generate code to check bounds before dereferencing pointers and arrays" } "Generate code to check bounds before dereferencing pointers and arrays" },
{"single-precision-constant", &flag_single_precision_constant, 1,
"Convert floating point constant to single precision constant"}
}; };
#define NUM_ELEM(a) (sizeof (a) / sizeof ((a)[0])) #define NUM_ELEM(a) (sizeof (a) / sizeof ((a)[0]))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment