Statistics
| Branch: | Revision:

root / tests / cris / check_ftag.c @ f97572e5

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
extern inline void cris_ftag_i(unsigned int x) {
8
        register unsigned int v asm("$r10") = x;
9
        asm ("ftagi\t[%0]\n" : : "r" (v) );
10
}
11
extern inline void cris_ftag_d(unsigned int x) {
12
        register unsigned int v asm("$r10") = x;
13
        asm ("ftagd\t[%0]\n" : : "r" (v) );
14
}
15
extern inline void cris_fidx_i(unsigned int x) {
16
        register unsigned int v asm("$r10") = x;
17
        asm ("fidxi\t[%0]\n" : : "r" (v) );
18
}
19
extern inline void cris_fidx_d(unsigned int x) {
20
        register unsigned int v asm("$r10") = x;
21
        asm ("fidxd\t[%0]\n" : : "r" (v) );
22
}
23

    
24

    
25
int main(void)
26
{
27
        cris_ftag_i(0);
28
        cris_ftag_d(0);
29
        cris_fidx_i(0);
30
        cris_fidx_d(0);
31
        pass();
32
        return 0;
33
}