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
dfaf3cdb
Commit
dfaf3cdb
authored
Sep 08, 2000
by
Stephane Carrez
Committed by
Stephane Carrez
Sep 08, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unsigned -> float conversion for fp-bit.c
From-SVN: r36274
parent
f246ff23
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
2 deletions
+46
-2
gcc/ChangeLog
+8
-0
gcc/Makefile.in
+2
-2
gcc/config/fp-bit.c
+32
-0
gcc/config/fp-bit.h
+4
-0
No files found.
gcc/ChangeLog
View file @
dfaf3cdb
2000-09-08 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* Makefile.in (DPBIT_FUNCS): Add _usi_to_df.
(FPBIT_FUNCS): Add _usi_to_sf.
* config/fp-bit.c (usi_to_float): New function.
* config/fp-bit.h (L_usi_to_sf, L_usi_to_df): Define.
(usi_to_float): Add appropriate #define.
2000-09-08 Bernd Schmidt <bernds@redhat.co.uk>
* i386-protos.h (sse_comparison_operator, mmx_reg_operand): Declare
...
...
gcc/Makefile.in
View file @
dfaf3cdb
...
...
@@ -753,12 +753,12 @@ LIB2FUNCS_EH = _eh
FPBIT_FUNCS
=
_pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf
\
_fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf
\
_lt_sf _le_sf _unord_sf _si_to_sf _sf_to_si _negate_sf _make_sf
\
_sf_to_df _thenan_sf _sf_to_usi
_sf_to_df _thenan_sf _sf_to_usi
_usi_to_sf
DPBIT_FUNCS
=
_pack_df _unpack_df _addsub_df _mul_df _div_df
\
_fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df
\
_lt_df _le_df _unord_df _si_to_df _df_to_si _negate_df _make_df
\
_df_to_sf _thenan_df _df_to_usi
_df_to_sf _thenan_df _df_to_usi
_usi_to_df
# The files that "belong" in CONFIG_H are deliberately omitted
# because having them there would not be useful in actual practice.
...
...
gcc/config/fp-bit.c
View file @
dfaf3cdb
...
...
@@ -1169,6 +1169,38 @@ si_to_float (SItype arg_a)
}
#endif
/* L_si_to_sf || L_si_to_df */
#if defined(L_usi_to_sf) || defined(L_usi_to_df)
FLO_type
usi_to_float
(
USItype
arg_a
)
{
fp_number_type
in
;
in
.
sign
=
0
;
if
(
!
arg_a
)
{
in
.
class
=
CLASS_ZERO
;
}
else
{
in
.
class
=
CLASS_NUMBER
;
in
.
normal_exp
=
FRACBITS
+
NGARDS
;
in
.
fraction
.
ll
=
arg_a
;
while
(
in
.
fraction
.
ll
>
(
1LL
<<
(
FRACBITS
+
NGARDS
)))
{
in
.
fraction
.
ll
>>=
1
;
in
.
normal_exp
+=
1
;
}
while
(
in
.
fraction
.
ll
<
(
1LL
<<
(
FRACBITS
+
NGARDS
)))
{
in
.
fraction
.
ll
<<=
1
;
in
.
normal_exp
-=
1
;
}
}
return
pack_d
(
&
in
);
}
#endif
#if defined(L_sf_to_si) || defined(L_df_to_si)
SItype
float_to_si
(
FLO_type
arg_a
)
...
...
gcc/config/fp-bit.h
View file @
dfaf3cdb
...
...
@@ -66,6 +66,8 @@ Boston, MA 02111-1307, USA. */
#define L_le_df
#define L_unord_sf
#define L_unord_df
#define L_usi_to_sf
#define L_usi_to_df
#define L_si_to_sf
#define L_si_to_df
#define L_sf_to_si
...
...
@@ -193,6 +195,7 @@ typedef unsigned int UDItype __attribute__ ((mode (DI)));
# define _lt_f2 __ltsf2
# define _le_f2 __lesf2
# define _unord_f2 __unordsf2
# define usi_to_float __floatunsisf
# define si_to_float __floatsisf
# define float_to_si __fixsfsi
# define float_to_usi __fixunssfsi
...
...
@@ -211,6 +214,7 @@ typedef unsigned int UDItype __attribute__ ((mode (DI)));
# define _lt_f2 __ltdf2
# define _le_f2 __ledf2
# define _unord_f2 __unorddf2
# define usi_to_float __floatunsidf
# define si_to_float __floatsidf
# define float_to_si __fixdfsi
# define float_to_usi __fixunsdfsi
...
...
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