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
d60819f8
Commit
d60819f8
authored
Apr 17, 2008
by
Christian Bruel
Committed by
Christian Bruel
Apr 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix SH long long compare
From-SVN: r134380
parent
ca4ceacb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
143 additions
and
0 deletions
+143
-0
gcc/ChangeLog
+5
-0
gcc/config/sh/sh.c
+8
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gcc.dg/long-long-compare-1.c
+126
-0
No files found.
gcc/ChangeLog
View file @
d60819f8
2008-04-17 Christian Bruel <christian.bruel@st.com>
* config/sh/sh.c (expand_cbranchdi4): Use original operands for
msw_skip comparison.
2008-04-16 Jakub Jelinek <jakub@redhat.com>
PR c/35739
...
...
gcc/config/sh/sh.c
View file @
d60819f8
...
...
@@ -1685,6 +1685,14 @@ expand_cbranchdi4 (rtx *operands, enum rtx_code comparison)
{
rtx
taken_label
=
operands
[
3
];
/* Operands were possibly modified, but msw_skip doesn't expect this.
Always use the original ones. */
if
(
msw_taken
!=
CODE_FOR_nothing
)
{
operands
[
1
]
=
op1h
;
operands
[
2
]
=
op2h
;
}
operands
[
3
]
=
skip_label
=
gen_label_rtx
();
expand_cbranchsi4
(
operands
,
msw_skip
,
msw_skip_prob
);
operands
[
3
]
=
taken_label
;
...
...
gcc/testsuite/ChangeLog
View file @
d60819f8
2008
-
04
-
17
Christian
Bruel
<
christian
.
bruel
@st
.
com
>
*
gcc
.
dg
/
dicomp
.
c
:
New
testcase
.
2008
-
04
-
16
Jerry
DeLisle
<
jvdelisle
@gcc
.
gnu
.
org
>
PR
fortran
/
35724
gcc/testsuite/gcc.dg/long-long-compare-1.c
0 → 100644
View file @
d60819f8
/* Problem only noticed on SH for -mcbranchdi DImode comparison with constants.
* Target dependant failure but test valid for alls. */
/* { dg-do run } */
/* { dg-options "-O0" } */
/* { dg-options "-O0 -mcbranchdi" { target sh4-*-* } } */
extern
void
abort
(
void
);
extern
void
exit
(
int
);
int
test2
(
long
long
n
)
{
if
(
n
<
2
)
return
1
;
return
0
;
}
int
test1
(
long
long
n
)
{
if
(
n
<
1
)
return
1
;
return
0
;
}
int
test0
(
long
long
n
)
{
if
(
n
<
0
)
return
1
;
return
0
;
}
int
test1n
(
long
long
n
)
{
if
(
n
<
-
1LL
)
return
1
;
return
0
;
}
int
test2n
(
long
long
n
)
{
if
(
n
<
-
2LL
)
return
1
;
return
0
;
}
int
main
()
{
if
(
test2n
(
-
1LL
))
abort
();
if
(
test2n
(
-
2LL
))
abort
();
if
(
test2n
(
0LL
))
abort
();
if
(
test2n
(
1LL
))
abort
();
if
(
test2n
(
2LL
))
abort
();
if
(
test1n
(
-
1LL
))
abort
();
if
(
!
test1n
(
-
2LL
))
abort
();
if
(
test1n
(
0LL
))
abort
();
if
(
test1n
(
1LL
))
abort
();
if
(
test1n
(
2LL
))
abort
();
if
(
!
test0
(
-
1LL
))
abort
();
if
(
!
test0
(
-
2LL
))
abort
();
if
(
test0
(
0LL
))
abort
();
if
(
test0
(
1LL
))
abort
();
if
(
test0
(
2LL
))
abort
();
if
(
!
test2
(
-
1LL
))
abort
();
if
(
!
test2
(
-
2LL
))
abort
();
if
(
!
test2
(
0LL
))
abort
();
if
(
!
test2
(
1LL
))
abort
();
if
(
test2
(
2LL
))
abort
();
if
(
!
test1
(
-
1LL
))
abort
();
if
(
!
test1
(
-
2LL
))
abort
();
if
(
!
test1
(
0LL
))
abort
();
if
(
test1
(
1LL
))
abort
();
if
(
test1
(
2LL
))
abort
();
exit
(
0
);
}
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