X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=qemu%2Ftests%2Ftcg%2Fcris%2Fcheck_ftag.c;fp=qemu%2Ftests%2Ftcg%2Fcris%2Fcheck_ftag.c;h=908773a38a8349c4d1cdfe615b9ff4c36256265a;hb=e44e3482bdb4d0ebde2d8b41830ac2cdb07948fb;hp=0000000000000000000000000000000000000000;hpb=9ca8dbcc65cfc63d6f5ef3312a33184e1d726e00;p=kvmfornfv.git diff --git a/qemu/tests/tcg/cris/check_ftag.c b/qemu/tests/tcg/cris/check_ftag.c new file mode 100644 index 000000000..908773a38 --- /dev/null +++ b/qemu/tests/tcg/cris/check_ftag.c @@ -0,0 +1,37 @@ +#include +#include +#include +#include "sys.h" +#include "crisutils.h" + +static inline void cris_ftag_i(unsigned int x) +{ + register unsigned int v asm("$r10") = x; + asm ("ftagi\t[%0]\n" : : "r" (v) ); +} +static inline void cris_ftag_d(unsigned int x) +{ + register unsigned int v asm("$r10") = x; + asm ("ftagd\t[%0]\n" : : "r" (v) ); +} +static inline void cris_fidx_i(unsigned int x) +{ + register unsigned int v asm("$r10") = x; + asm ("fidxi\t[%0]\n" : : "r" (v) ); +} +static inline void cris_fidx_d(unsigned int x) +{ + register unsigned int v asm("$r10") = x; + asm ("fidxd\t[%0]\n" : : "r" (v) ); +} + + +int main(void) +{ + cris_ftag_i(0); + cris_ftag_d(0); + cris_fidx_i(0); + cris_fidx_d(0); + pass(); + return 0; +}