repo.or.cz
/
qemu.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge tag 'qemu-macppc-20230206' of https://github.com/mcayland/qemu into staging
[qemu.git]
/
tests
/
tcg
/
loongarch64
/
test_fcsr.c
blob
ad3609eb99a6d580c540d987176a3869191770c1
1
#include <assert.h>
2
3
int
main
()
4
{
5
unsigned
fcsr
;
6
7
asm
(
"movgr2fcsr $r0,$r0
\n\t
"
8
"movgr2fr.d $f0,$r0
\n\t
"
9
"fdiv.d $f0,$f0,$f0
\n\t
"
10
"movfcsr2gr %0,$r0"
11
:
"=r"
(
fcsr
) : :
"f0"
);
12
13
assert
(
fcsr
& (
16
<<
16
));
/* Invalid */
14
return
0
;
15
}