aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cris/check_ftag.c
blob: 908773a38a8349c4d1cdfe615b9ff4c36256265a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#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;
}