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
2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.target
/
arm
/
pr77904.c
blob
76728c07e73350ce44160cabff3dd2fa7a6ef021
1
/* { dg-do run } */
2
/* { dg-options "-O2" } */
3
4
__attribute__
((
noinline
,
noclone
))
void
5
clobber_sp
(
void
)
6
{
7
__asm
volatile
(
""
: : :
"sp"
);
8
}
9
10
int
11
main
(
void
)
12
{
13
int
ret
;
14
15
__asm
volatile
(
"mov
\t
r4, #0xf4
\n\t
"
16
"mov
\t
r5, #0xf5
\n\t
"
17
"mov
\t
r6, #0xf6
\n\t
"
18
"mov
\t
r7, #0xf7
\n\t
"
19
"mov
\t
r0, #0xf8
\n\t
"
20
"mov
\t
r8, r0
\n\t
"
21
"mov
\t
r0, #0xfa
\n\t
"
22
"mov
\t
r10, r0"
23
: : :
"r0"
,
"r4"
,
"r5"
,
"r6"
,
"r7"
,
"r8"
,
"r10"
);
24
clobber_sp
();
25
26
__asm
volatile
(
"cmp
\t
r4, #0xf4
\n\t
"
27
"bne
\t
fail
\n\t
"
28
"cmp
\t
r5, #0xf5
\n\t
"
29
"bne
\t
fail
\n\t
"
30
"cmp
\t
r6, #0xf6
\n\t
"
31
"bne
\t
fail
\n\t
"
32
"cmp
\t
r7, #0xf7
\n\t
"
33
"bne
\t
fail
\n\t
"
34
"mov
\t
r0, r8
\n\t
"
35
"cmp
\t
r0, #0xf8
\n\t
"
36
"bne
\t
fail
\n\t
"
37
"mov
\t
r0, r10
\n\t
"
38
"cmp
\t
r0, #0xfa
\n\t
"
39
"bne
\t
fail
\n\t
"
40
"mov
\t
%0, #1
\n
"
41
"fail:
\n\t
"
42
"sub
\t
r0, #1"
43
:
"=r"
(
ret
) : :);
44
return
ret
;
45
}