Sign in
qemu
/
qemu
/
34acb67f0309fca2ae1921fd0df9f0a217a7a92f
/
.
/
tests
/
tcg
/
loongarch64
/
test_fcsr.c
blob: ad3609eb99a6d580c540d987176a3869191770c1 [
file
] [
log
] [
blame
]
#include
<assert.h>
int
main
()
{
unsigned
fcsr
;
asm
(
"movgr2fcsr $r0,$r0\n\t"
"movgr2fr.d $f0,$r0\n\t"
"fdiv.d $f0,$f0,$f0\n\t"
"movfcsr2gr %0,$r0"
:
"=r"
(
fcsr
)
:
:
"f0"
);
assert
(
fcsr
&
(
16
<<
16
));
/* Invalid */
return
0
;
}