Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
b3810360
Commit
b3810360
authored
Mar 19, 2004
by
Kaveh R. Ghazi
Committed by
Kaveh Ghazi
Mar 19, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* convert.c (convert_to_real): Reformat using switch stmt.
From-SVN: r79667
parent
9d363a56
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
10 deletions
+18
-10
gcc/ChangeLog
+4
-0
gcc/convert.c
+14
-10
No files found.
gcc/ChangeLog
View file @
b3810360
2004-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* convert.c (convert_to_real): Reformat using switch stmt.
2004-03-18 Mark Mitchell <mark@codesourcery.com>
* c-common.c (pointer_int_sum): Do not complain about using
...
...
gcc/convert.c
View file @
b3810360
...
...
@@ -131,19 +131,19 @@ convert_to_real (tree type, tree expr)
present in runtime. */
/* Convert (float)sqrt((double)x) where x is float into sqrtf(x) */
if
(
optimize
&&
(
fcode
==
BUILT_IN_SQRT
||
fcode
==
BUILT_IN_SQRTL
||
fcode
==
BUILT_IN_SIN
||
fcode
==
BUILT_IN_SINL
||
fcode
==
BUILT_IN_COS
||
fcode
==
BUILT_IN_COSL
||
fcode
==
BUILT_IN_EXP
||
fcode
==
BUILT_IN_EXPL
||
fcode
==
BUILT_IN_LOG
||
fcode
==
BUILT_IN_LOGL
)
&&
(
TYPE_MODE
(
type
)
==
TYPE_MODE
(
double_type_node
)
||
TYPE_MODE
(
type
)
==
TYPE_MODE
(
float_type_node
)))
{
switch
(
fcode
)
{
#define CASE_MATHFN(FN) case BUILT_IN_##FN: case BUILT_IN_##FN##L:
CASE_MATHFN
(
SQRT
)
CASE_MATHFN
(
SIN
)
CASE_MATHFN
(
COS
)
CASE_MATHFN
(
EXP
)
CASE_MATHFN
(
LOG
)
#undef CASE_MATHFN
{
tree
arg0
=
strip_float_extensions
(
TREE_VALUE
(
TREE_OPERAND
(
expr
,
1
)));
tree
newtype
=
type
;
...
...
@@ -171,6 +171,10 @@ convert_to_real (tree type, tree expr)
}
}
}
default:
break
;
}
}
if
(
optimize
&&
(((
fcode
==
BUILT_IN_FLOORL
||
fcode
==
BUILT_IN_CEILL
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment