repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[AArch64] SVE tests
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.target
/
aarch64
/
asm-adder-clobber-lr.c
blob
540c79b0135272b096e799e8bc60e4cbc124955d
1
extern
void
abort
(
void
);
2
3
int
4
adder
(
int
a
,
int
b
)
5
{
6
int
result
;
7
__asm__
(
"add %w0,%w1,%w2"
:
"=r"
(
result
) :
"r"
(
a
),
"r"
(
b
) :
"x30"
);
8
return
result
;
9
}
10
11
int
12
main
(
int
argc
,
char
**
argv
)
13
{
14
int
i
;
15
int
total
=
argc
;
16
for
(
i
=
0
;
i
<
20
;
i
++)
17
total
=
adder
(
total
,
i
);
18
19
if
(
total
!= (
190
+
argc
))
20
abort
();
21
22
return
0
;
23
}