repo.or.cz
/
valgrind.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Bug 497723 - forgot to restore callgrind output cleanup
[valgrind.git]
/
none
/
tests
/
ppc64
/
test_tm.c
blob
c829384e233fe631e1abc2e23b92e514b0a27ec2
1
#include <stdio.h>
2
#ifdef SUPPORTS_HTM
3
int
__attribute__
((
noinline
))
htm_begin
(
int
r3
,
int
r4
)
4
{
5
int
ret
;
6
7
if
(
__builtin_tbegin
(
0
)) {
8
ret
=
r3
;
9
__builtin_tend
(
0
);
10
}
else
{
11
ret
=
r4
;
12
}
return
ret
;
13
}
14
#endif
15
16
int
main
(
void
) {
17
#ifdef SUPPORTS_HTM
18
int
ret
;
19
ret
=
htm_begin
(
10
,
20
);
20
printf
(
"ret = %d, expected = 10
\n
"
,
ret
);
21
#else
22
printf
(
"No HTM support."
);
23
#endif
24
return
0
;
25
}