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
de40e1df
Commit
de40e1df
authored
Oct 21, 2002
by
Dale Johannesen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix fastmath-specific crash PR 7133.
From-SVN: r58389
parent
e3ccdd50
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
2 deletions
+41
-2
gcc/ChangeLog
+8
-0
gcc/config/rs6000/rs6000.c
+9
-2
gcc/testsuite/gcc.dg/fastmath-1.c
+24
-0
No files found.
gcc/ChangeLog
View file @
de40e1df
2002
-
10
-
21
Dale
Johannesen
<
dalej
@apple
.
com
>
*
config
/
rs6000
/
rs6000
.
c
(
rs6000_reverse_condition
)
:
Handle
unsafe
math
reversals
correctly
for
RTL
generation
.
(
output_cbranch
)
:
Replace
rs6000_reverse_condition
call
by
its
former
definition
.
2002
-
10
-
21
Jakub
Jelinek
<
jakub
@redhat
.
com
>
2002
-
10
-
21
Jakub
Jelinek
<
jakub
@redhat
.
com
>
*
config
/
i386
/
i386
.
c
(
x86_64_sign_extended_value
)
:
Add
allow_rip
*
config
/
i386
/
i386
.
c
(
x86_64_sign_extended_value
)
:
Add
allow_rip
...
@@ -355,6 +362,7 @@ Sat Oct 19 10:46:52 CEST 2002 Jan Hubicka <jh@suse.cz>
...
@@ -355,6 +362,7 @@ Sat Oct 19 10:46:52 CEST 2002 Jan Hubicka <jh@suse.cz>
*
doc
/
c
-
tree
.
texi
:
Update
description
of
COND_EXPR
tree
nodes
.
*
doc
/
c
-
tree
.
texi
:
Update
description
of
COND_EXPR
tree
nodes
.
>>>>>>>
1
.
15743
2002
-
10
-
17
Geoffrey
Keating
<
geoffk
@apple
.
com
>
2002
-
10
-
17
Geoffrey
Keating
<
geoffk
@apple
.
com
>
*
config
/
rs6000
/
rs6000
.
h
(
HARD_REGNO_MODE_OK
)
:
Allow
arbitrary
modes
*
config
/
rs6000
/
rs6000
.
h
(
HARD_REGNO_MODE_OK
)
:
Allow
arbitrary
modes
...
...
gcc/config/rs6000/rs6000.c
View file @
de40e1df
...
@@ -8125,7 +8125,7 @@ rs6000_reverse_condition (mode, code)
...
@@ -8125,7 +8125,7 @@ rs6000_reverse_condition (mode, code)
{
{
/* Reversal of FP compares takes care -- an ordered compare
/* Reversal of FP compares takes care -- an ordered compare
becomes an unordered compare and vice versa. */
becomes an unordered compare and vice versa. */
if
(
mode
==
CCFPmode
)
if
(
mode
==
CCFPmode
&&
!
flag_unsafe_math_optimizations
)
return
reverse_condition_maybe_unordered
(
code
);
return
reverse_condition_maybe_unordered
(
code
);
else
else
return
reverse_condition
(
code
);
return
reverse_condition
(
code
);
...
@@ -8397,7 +8397,14 @@ output_cbranch (op, label, reversed, insn)
...
@@ -8397,7 +8397,14 @@ output_cbranch (op, label, reversed, insn)
reverse_condition_maybe_unordered here always but this
reverse_condition_maybe_unordered here always but this
makes the resulting assembler clearer. */
makes the resulting assembler clearer. */
if
(
really_reversed
)
if
(
really_reversed
)
code
=
rs6000_reverse_condition
(
mode
,
code
);
{
/* Reversal of FP compares takes care -- an ordered compare
becomes an unordered compare and vice versa. */
if
(
mode
==
CCFPmode
)
code
=
reverse_condition_maybe_unordered
(
code
);
else
code
=
reverse_condition
(
code
);
}
if
((
TARGET_SPE
&&
TARGET_HARD_FLOAT
)
&&
mode
==
CCFPmode
)
if
((
TARGET_SPE
&&
TARGET_HARD_FLOAT
)
&&
mode
==
CCFPmode
)
{
{
...
...
gcc/testsuite/gcc.dg/fastmath-1.c
0 → 100644
View file @
de40e1df
/* { dg-do run } */
/* { dg-options "-O2 -ffast-math" } */
int
foo
(
float
*
dists
,
int
k
)
{
if
(
(
dists
[
0
]
>
0
)
==
(
dists
[
1
]
>
0
)
)
return
k
;
return
0
;
}
main
()
{
float
dists
[
16
]
=
{
0
.,
1
.,
1
.,
0
.,
0
.,
-
1
.,
-
1
.,
0
.,
1
.,
1
.,
1
.,
-
1
.,
-
1
.,
1
.,
-
1
.,
-
1
.
};
if
(
foo
(
&
dists
[
0
],
1
)
+
foo
(
&
dists
[
2
],
2
)
+
foo
(
&
dists
[
4
],
4
)
+
foo
(
&
dists
[
6
],
8
)
+
foo
(
&
dists
[
8
],
16
)
+
foo
(
&
dists
[
10
],
32
)
+
foo
(
&
dists
[
12
],
64
)
+
foo
(
&
dists
[
14
],
128
)
!=
156
)
abort
();
}
\ No newline at end of file
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