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
d730ef29
Commit
d730ef29
authored
29 years ago
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(emdnorm, toe64, etoe64): Significand of Intel long double denormals
is shifted down one bit. From-SVN: r9578
parent
0e8c9172
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
3 deletions
+23
-3
gcc/real.c
+23
-3
No files found.
gcc/real.c
View file @
d730ef29
...
...
@@ -2367,8 +2367,10 @@ emdnorm (s, lost, subflg, exp, rcntrl)
}
/* Shift down 1 temporarily if the data structure has an implied
most significant bit and the number is denormal. */
if
((
exp
<=
0
)
&&
(
rndprc
!=
64
)
&&
(
rndprc
!=
NBITS
))
most significant bit and the number is denormal.
Intel long double denormals also lose one bit of precision. */
if
((
exp
<=
0
)
&&
(
rndprc
!=
NBITS
)
&&
((
rndprc
!=
64
)
||
((
rndprc
==
64
)
&&
!
REAL_WORDS_BIG_ENDIAN
)))
{
lost
|=
s
[
NI
-
1
]
&
1
;
eshdn1
(
s
);
...
...
@@ -2406,7 +2408,9 @@ emdnorm (s, lost, subflg, exp, rcntrl)
eaddm
(
rbit
,
s
);
}
mddone
:
if
((
exp
<=
0
)
&&
(
rndprc
!=
64
)
&&
(
rndprc
!=
NBITS
))
/* Undo the temporary shift for denormal values. */
if
((
exp
<=
0
)
&&
(
rndprc
!=
NBITS
)
&&
((
rndprc
!=
64
)
||
((
rndprc
==
64
)
&&
!
REAL_WORDS_BIG_ENDIAN
)))
{
eshup1
(
s
);
}
...
...
@@ -2948,6 +2952,19 @@ e64toe (pe, y)
{
for
(
i
=
0
;
i
<
5
;
i
++
)
*
p
++
=
*
e
++
;
/* For denormal long double Intel format, shift significand up one
-- but only if the top significand bit is zero. A top bit of 1
is "pseudodenormal" when the exponent is zero. */
if
((
yy
[
NE
-
1
]
&
0x7fff
)
==
0
&&
(
yy
[
NE
-
2
]
&
0x8000
)
==
0
)
{
unsigned
EMUSHORT
temp
[
NI
];
emovi
(
yy
,
temp
);
eshup1
(
temp
);
emovo
(
temp
,
y
);
return
;
}
}
else
{
...
...
@@ -3323,6 +3340,9 @@ toe64 (a, b)
return
;
}
#endif
/* Shift denormal long double Intel format significand down one bit. */
if
((
a
[
E
]
==
0
)
&&
!
REAL_WORDS_BIG_ENDIAN
)
eshdn1
(
a
);
p
=
a
;
#ifdef IBM
q
=
b
;
...
...
This diff is collapsed.
Click to expand it.
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