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
39d78b32
Commit
39d78b32
authored
27 years ago
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(check_float_value): Underflow and overflow constants are different
for FLOAT_VAX and default targets. From-SVN: r14190
parent
9a8fde94
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
12 deletions
+22
-12
gcc/config/alpha/alpha.c
+22
-12
No files found.
gcc/config/alpha/alpha.c
View file @
39d78b32
...
...
@@ -2959,13 +2959,20 @@ final_prescan_insn (insn, opvec, noperands)
static
char
*
float_strings
[]
=
{
/* These are for FLOAT_VAX. */
"1.70141173319264430e+38"
,
/* 2^127 (2^24 - 1) / 2^24 */
"-1.70141173319264430e+38"
,
"2.93873587705571877e-39"
,
/* 2^-128 */
"-2.93873587705571877e-39"
"-2.93873587705571877e-39"
,
/* These are for the default broken IEEE mode, which traps
on infinity or denormal numbers. */
"3.402823466385288598117e+38"
,
/* 2^128 (1 - 2^-24) */
"-3.402823466385288598117e+38"
,
"1.1754943508222875079687e-38"
,
/* 2^-126 */
"-1.1754943508222875079687e-38"
,
};
static
REAL_VALUE_TYPE
float_values
[
4
];
static
REAL_VALUE_TYPE
float_values
[
8
];
static
int
inited_float_values
=
0
;
int
...
...
@@ -2978,13 +2985,10 @@ check_float_value (mode, d, overflow)
if
(
TARGET_IEEE
||
TARGET_IEEE_CONFORMANT
||
TARGET_IEEE_WITH_INEXACT
)
return
0
;
if
(
TARGET_FLOAT_VAX
)
return
0
;
if
(
inited_float_values
==
0
)
{
int
i
;
for
(
i
=
0
;
i
<
4
;
i
++
)
for
(
i
=
0
;
i
<
8
;
i
++
)
float_values
[
i
]
=
REAL_VALUE_ATOF
(
float_strings
[
i
],
DFmode
);
inited_float_values
=
1
;
...
...
@@ -2993,28 +2997,34 @@ check_float_value (mode, d, overflow)
if
(
mode
==
SFmode
)
{
REAL_VALUE_TYPE
r
;
REAL_VALUE_TYPE
*
fvptr
;
if
(
TARGET_FLOAT_VAX
)
fvptr
=
&
float_values
[
0
];
else
fvptr
=
&
float_values
[
4
];
bcopy
((
char
*
)
d
,
(
char
*
)
&
r
,
sizeof
(
REAL_VALUE_TYPE
));
if
(
REAL_VALUES_LESS
(
f
loat_values
[
0
],
r
))
if
(
REAL_VALUES_LESS
(
f
vptr
[
0
],
r
))
{
bcopy
((
char
*
)
&
f
loat_values
[
0
],
(
char
*
)
d
,
bcopy
((
char
*
)
&
f
vptr
[
0
],
(
char
*
)
d
,
sizeof
(
REAL_VALUE_TYPE
));
return
1
;
}
else
if
(
REAL_VALUES_LESS
(
r
,
f
loat_values
[
1
]))
else
if
(
REAL_VALUES_LESS
(
r
,
f
vptr
[
1
]))
{
bcopy
((
char
*
)
&
f
loat_values
[
1
],
(
char
*
)
d
,
bcopy
((
char
*
)
&
f
vptr
[
1
],
(
char
*
)
d
,
sizeof
(
REAL_VALUE_TYPE
));
return
1
;
}
else
if
(
REAL_VALUES_LESS
(
dconst0
,
r
)
&&
REAL_VALUES_LESS
(
r
,
f
loat_values
[
2
]))
&&
REAL_VALUES_LESS
(
r
,
f
vptr
[
2
]))
{
bcopy
((
char
*
)
&
dconst0
,
(
char
*
)
d
,
sizeof
(
REAL_VALUE_TYPE
));
return
1
;
}
else
if
(
REAL_VALUES_LESS
(
r
,
dconst0
)
&&
REAL_VALUES_LESS
(
f
loat_values
[
3
],
r
))
&&
REAL_VALUES_LESS
(
f
vptr
[
3
],
r
))
{
bcopy
((
char
*
)
&
dconst0
,
(
char
*
)
d
,
sizeof
(
REAL_VALUE_TYPE
));
return
1
;
...
...
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