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
1bbddf11
Commit
1bbddf11
authored
Aug 28, 1992
by
James Van Artsdalen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_builtin): Add sin and cos as built-in functions.c
From-SVN: r1983
parent
a199fdd6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
gcc/expr.c
+18
-3
No files found.
gcc/expr.c
View file @
1bbddf11
...
...
@@ -5057,6 +5057,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
rtx
op0
;
rtx
lab1
,
insns
;
enum
machine_mode
value_mode
=
TYPE_MODE
(
TREE_TYPE
(
exp
));
optab
builtin_optab
;
switch
(
DECL_FUNCTION_CODE
(
fndecl
))
{
...
...
@@ -5066,6 +5067,8 @@ expand_builtin (exp, target, subtarget, mode, ignore)
/* build_function_call changes these into ABS_EXPR. */
abort
();
case
BUILT_IN_SIN
:
case
BUILT_IN_COS
:
case
BUILT_IN_FSQRT
:
/* If not optimizing, call the library function. */
if
(
!
optimize
)
...
...
@@ -5093,10 +5096,22 @@ expand_builtin (exp, target, subtarget, mode, ignore)
emit_queue
();
start_sequence
();
/* Compute sqrt into TARGET.
switch
(
DECL_FUNCTION_CODE
(
fndecl
))
{
case
BUILT_IN_SIN
:
builtin_optab
=
sin_optab
;
break
;
case
BUILT_IN_COS
:
builtin_optab
=
cos_optab
;
break
;
case
BUILT_IN_FSQRT
:
builtin_optab
=
sqrt_optab
;
break
;
default
:
abort
();
}
/* Compute into TARGET.
Set TARGET to wherever the result comes back. */
target
=
expand_unop
(
TYPE_MODE
(
TREE_TYPE
(
TREE_VALUE
(
arglist
))),
sqrt
_optab
,
op0
,
target
,
0
);
builtin
_optab
,
op0
,
target
,
0
);
/* If we were unable to expand via the builtin, stop the
sequence (without outputting the insns) and break, causing
...
...
@@ -5112,7 +5127,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
if
(
!
flag_fast_math
)
{
/* Don't define the
sqrt
instructions
/* Don't define the
builtin FP
instructions
if your machine is not IEEE. */
if
(
TARGET_FLOAT_FORMAT
!=
IEEE_FLOAT_FORMAT
)
abort
();
...
...
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