symbian-qemu-0.9.1-12/qemu-symbian-svp/tests/cris/check_ftag.c
author cdavies@GUAR
Tue, 26 Jan 2010 13:03:40 +0000
branchphonesim-integ
changeset 36 a587897e3bb2
parent 1 2fb8b9db1c86
permissions -rw-r--r--
start phonesim-integ

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "sys.h"
#include "crisutils.h"

extern inline void cris_ftag_i(unsigned int x) {
	register unsigned int v asm("$r10") = x;
	asm ("ftagi\t[%0]\n" : : "r" (v) );
}
extern inline void cris_ftag_d(unsigned int x) {
	register unsigned int v asm("$r10") = x;
	asm ("ftagd\t[%0]\n" : : "r" (v) );
}
extern inline void cris_fidx_i(unsigned int x) {
	register unsigned int v asm("$r10") = x;
	asm ("fidxi\t[%0]\n" : : "r" (v) );
}
extern 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;
}