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
dc491849
Commit
dc491849
authored
May 08, 2008
by
Sa Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test subti3
From-SVN: r135074
parent
f51de793
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
gcc/testsuite/gcc.target/spu/subti3.c
+45
-0
No files found.
gcc/testsuite/gcc.target/spu/subti3.c
0 → 100644
View file @
dc491849
/* { dg-do run } */
/* { dg-options "-std=c99" } */
#include <stdlib.h>
typedef
int
TItype
__attribute__
((
mode
(
TI
)));
typedef
int
DItype
__attribute__
((
mode
(
DI
)));
typedef
unsigned
int
UDItype
__attribute__
((
mode
(
DI
)));
struct
DIstruct
{
DItype
high
,
low
;};
typedef
union
{
struct
DIstruct
s
;
TItype
t
;
}
TIunion
;
static
void
sub_ddmmss
(
UDItype
*
sh
,
UDItype
*
sl
,
UDItype
ah
,
UDItype
al
,
UDItype
bh
,
UDItype
bl
)
{
UDItype
x
;
x
=
al
-
bl
;
*
sh
=
ah
-
bh
-
(
x
>
al
);
*
sl
=
x
;
}
int
main
(
void
)
{
TIunion
aa
,
bb
,
cc
;
TItype
m
=
0x1111111111111110ULL
;
TItype
n
=
0x1111111111111111ULL
;
TItype
d
;
aa
.
s
.
high
=
m
;
aa
.
s
.
low
=
m
;
bb
.
s
.
high
=
n
;
bb
.
s
.
low
=
n
;
sub_ddmmss
(
&
cc
.
s
.
high
,
&
cc
.
s
.
low
,
aa
.
s
.
high
,
aa
.
s
.
low
,
bb
.
s
.
high
,
bb
.
s
.
low
);
d
=
aa
.
t
-
bb
.
t
;
if
(
d
!=
cc
.
t
)
abort
();
cc
.
t
=
aa
.
t
-
d
;
if
(
cc
.
t
!=
bb
.
t
)
abort
();
return
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