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
732149f9
Commit
732149f9
authored
Dec 06, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(init_decl_processing): Implement built-in functions fabsf, sqrtf,
sinf, cosf, fabsl, sqrtl, sinl, cosl. From-SVN: r8619
parent
136cf361
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
gcc/c-decl.c
+37
-0
No files found.
gcc/c-decl.c
View file @
732149f9
...
...
@@ -178,6 +178,8 @@ tree default_function_type;
tree
double_ftype_double
,
double_ftype_double_double
;
tree
int_ftype_int
,
long_ftype_long
;
tree
float_ftype_float
;
tree
ldouble_ftype_ldouble
;
/* Function type `void (void *, void *, int)' and similar ones */
...
...
@@ -2916,10 +2918,19 @@ init_decl_processing ()
void_ftype_any
=
build_function_type
(
void_type_node
,
NULL_TREE
);
float_ftype_float
=
build_function_type
(
float_type_node
,
tree_cons
(
NULL_TREE
,
float_type_node
,
endlink
));
double_ftype_double
=
build_function_type
(
double_type_node
,
tree_cons
(
NULL_TREE
,
double_type_node
,
endlink
));
ldouble_ftype_ldouble
=
build_function_type
(
long_double_type_node
,
tree_cons
(
NULL_TREE
,
long_double_type_node
,
endlink
));
double_ftype_double_double
=
build_function_type
(
double_type_node
,
tree_cons
(
NULL_TREE
,
double_type_node
,
...
...
@@ -3037,8 +3048,12 @@ init_decl_processing ()
}
builtin_function
(
"__builtin_abs"
,
int_ftype_int
,
BUILT_IN_ABS
,
NULL_PTR
);
builtin_function
(
"__builtin_fabsf"
,
float_ftype_float
,
BUILT_IN_FABS
,
NULL_PTR
);
builtin_function
(
"__builtin_fabs"
,
double_ftype_double
,
BUILT_IN_FABS
,
NULL_PTR
);
builtin_function
(
"__builtin_fabsl"
,
ldouble_ftype_ldouble
,
BUILT_IN_FABS
,
NULL_PTR
);
builtin_function
(
"__builtin_labs"
,
long_ftype_long
,
BUILT_IN_LABS
,
NULL_PTR
);
builtin_function
(
"__builtin_saveregs"
,
...
...
@@ -3099,12 +3114,24 @@ init_decl_processing ()
BUILT_IN_STRCPY
,
"strcpy"
);
builtin_function
(
"__builtin_strlen"
,
strlen_ftype
,
BUILT_IN_STRLEN
,
"strlen"
);
builtin_function
(
"__builtin_sqrtf"
,
float_ftype_float
,
BUILT_IN_FSQRT
,
"sqrtf"
);
builtin_function
(
"__builtin_fsqrt"
,
double_ftype_double
,
BUILT_IN_FSQRT
,
"sqrt"
);
builtin_function
(
"__builtin_sqrtl"
,
ldouble_ftype_ldouble
,
BUILT_IN_FSQRT
,
"sqrtl"
);
builtin_function
(
"__builtin_sinf"
,
float_ftype_float
,
BUILT_IN_SIN
,
"sinf"
);
builtin_function
(
"__builtin_sin"
,
double_ftype_double
,
BUILT_IN_SIN
,
"sin"
);
builtin_function
(
"__builtin_sinl"
,
ldouble_ftype_ldouble
,
BUILT_IN_SIN
,
"sinl"
);
builtin_function
(
"__builtin_cosf"
,
float_ftype_float
,
BUILT_IN_COS
,
"cosf"
);
builtin_function
(
"__builtin_cos"
,
double_ftype_double
,
BUILT_IN_COS
,
"cos"
);
builtin_function
(
"__builtin_cosl"
,
ldouble_ftype_ldouble
,
BUILT_IN_COS
,
"cosl"
);
/* In an ANSI C program, it is okay to supply built-in meanings
for these functions, since applications cannot validly use them
...
...
@@ -3113,7 +3140,10 @@ init_decl_processing ()
if
(
!
flag_no_builtin
)
{
builtin_function
(
"abs"
,
int_ftype_int
,
BUILT_IN_ABS
,
NULL_PTR
);
builtin_function
(
"fabsf"
,
float_ftype_float
,
BUILT_IN_FABS
,
NULL_PTR
);
builtin_function
(
"fabs"
,
double_ftype_double
,
BUILT_IN_FABS
,
NULL_PTR
);
builtin_function
(
"fabsl"
,
ldouble_ftype_ldouble
,
BUILT_IN_FABS
,
NULL_PTR
);
builtin_function
(
"labs"
,
long_ftype_long
,
BUILT_IN_LABS
,
NULL_PTR
);
builtin_function
(
"memcpy"
,
memcpy_ftype
,
BUILT_IN_MEMCPY
,
NULL_PTR
);
builtin_function
(
"memcmp"
,
int_ftype_cptr_cptr_sizet
,
BUILT_IN_MEMCMP
,
...
...
@@ -3123,9 +3153,16 @@ init_decl_processing ()
builtin_function
(
"strcpy"
,
string_ftype_ptr_ptr
,
BUILT_IN_STRCPY
,
NULL_PTR
);
builtin_function
(
"strlen"
,
strlen_ftype
,
BUILT_IN_STRLEN
,
NULL_PTR
);
builtin_function
(
"sqrtf"
,
float_ftype_float
,
BUILT_IN_FSQRT
,
NULL_PTR
);
builtin_function
(
"sqrt"
,
double_ftype_double
,
BUILT_IN_FSQRT
,
NULL_PTR
);
builtin_function
(
"sqrtl"
,
ldouble_ftype_ldouble
,
BUILT_IN_FSQRT
,
NULL_PTR
);
builtin_function
(
"sinf"
,
float_ftype_float
,
BUILT_IN_SIN
,
NULL_PTR
);
builtin_function
(
"sin"
,
double_ftype_double
,
BUILT_IN_SIN
,
NULL_PTR
);
builtin_function
(
"sinl"
,
ldouble_ftype_ldouble
,
BUILT_IN_SIN
,
NULL_PTR
);
builtin_function
(
"cosf"
,
float_ftype_float
,
BUILT_IN_COS
,
NULL_PTR
);
builtin_function
(
"cos"
,
double_ftype_double
,
BUILT_IN_COS
,
NULL_PTR
);
builtin_function
(
"cosl"
,
ldouble_ftype_ldouble
,
BUILT_IN_COS
,
NULL_PTR
);
/* Declare these functions volatile
to avoid spurious "control drops through" warnings. */
...
...
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