Statistics
| Branch: | Revision:

root / tests / tcg / cris / check_ftag.c @ c09015dd

History | View | Annotate | Download (729 Bytes)

1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <stdint.h>
4
#include "sys.h"
5
#include "crisutils.h"
6

    
7
static inline void cris_ftag_i(unsigned int x)
8
{
9
        register unsigned int v asm("$r10") = x;
10
        asm ("ftagi\t[%0]\n" : : "r" (v) );
11
}
12
static inline void cris_ftag_d(unsigned int x)
13
{
14
        register unsigned int v asm("$r10") = x;
15
        asm ("ftagd\t[%0]\n" : : "r" (v) );
16
}
17
static inline void cris_fidx_i(unsigned int x)
18
{
19
        register unsigned int v asm("$r10") = x;
20
        asm ("fidxi\t[%0]\n" : : "r" (v) );
21
}
22
static inline void cris_fidx_d(unsigned int x)
23
{
24
        register unsigned int v asm("$r10") = x;
25
        asm ("fidxd\t[%0]\n" : : "r" (v) );
26
}
27

    
28

    
29
int main(void)
30
{
31
        cris_ftag_i(0);
32
        cris_ftag_d(0);
33
        cris_fidx_i(0);
34
        cris_fidx_d(0);
35
        pass();
36
        return 0;
37
}