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
FreeBSD: add file descriptor tracking for _umtx_op
[valgrind.git]
/
none
/
tests
/
s390x
/
cvd.c
blob
041cdcbceffbae2f4019544accf5b4665912d7fb
1
#include <stdio.h>
2
3
static signed int
test
[] ={
4
0
,
5
1
,
6
-
1
,
7
0x7fffffff
,
8
0x80000000
,
9
0x12345678
,
10
0x87654321
,
11
0x55555555
,
12
0x11111111
,
13
0xaaaaaaaa
,
14
};
15
16
17
static unsigned long
hex_to_dec
(
signed int
num
)
18
{
19
unsigned long
dec
;
20
asm
(
"cvd %1,%0"
:
"=S"
(
dec
) :
"d"
(
num
) : );
21
return
dec
;
22
}
23
24
int
main
()
25
{
26
int
i
;
27
28
for
(
i
=
0
;
i
<
sizeof
(
test
) /
sizeof
(
test
[
0
]);
i
++)
29
printf
(
"%lx
\n
"
,
hex_to_dec
(
test
[
i
]));
30
return
0
;
31
}