]>
Commit | Line | Data |
---|---|---|
1b893ef3 EI |
1 | #include <stdio.h> |
2 | #include <stdlib.h> | |
3 | #include <stdint.h> | |
4 | #include "sys.h" | |
5 | #include "crisutils.h" | |
6 | ||
4a6648f4 BS |
7 | static inline void cris_ftag_i(unsigned int x) |
8 | { | |
1b893ef3 EI |
9 | register unsigned int v asm("$r10") = x; |
10 | asm ("ftagi\t[%0]\n" : : "r" (v) ); | |
11 | } | |
4a6648f4 BS |
12 | static inline void cris_ftag_d(unsigned int x) |
13 | { | |
1b893ef3 EI |
14 | register unsigned int v asm("$r10") = x; |
15 | asm ("ftagd\t[%0]\n" : : "r" (v) ); | |
16 | } | |
4a6648f4 BS |
17 | static inline void cris_fidx_i(unsigned int x) |
18 | { | |
1b893ef3 EI |
19 | register unsigned int v asm("$r10") = x; |
20 | asm ("fidxi\t[%0]\n" : : "r" (v) ); | |
21 | } | |
4a6648f4 BS |
22 | static inline void cris_fidx_d(unsigned int x) |
23 | { | |
1b893ef3 EI |
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 | } |