2008-02-25 11:00:07 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "sys.h"
|
|
|
|
#include "crisutils.h"
|
|
|
|
|
2011-01-17 21:26:30 +01:00
|
|
|
static inline void cris_ftag_i(unsigned int x)
|
|
|
|
{
|
2008-02-25 11:00:07 +01:00
|
|
|
register unsigned int v asm("$r10") = x;
|
|
|
|
asm ("ftagi\t[%0]\n" : : "r" (v) );
|
|
|
|
}
|
2011-01-17 21:26:30 +01:00
|
|
|
static inline void cris_ftag_d(unsigned int x)
|
|
|
|
{
|
2008-02-25 11:00:07 +01:00
|
|
|
register unsigned int v asm("$r10") = x;
|
|
|
|
asm ("ftagd\t[%0]\n" : : "r" (v) );
|
|
|
|
}
|
2011-01-17 21:26:30 +01:00
|
|
|
static inline void cris_fidx_i(unsigned int x)
|
|
|
|
{
|
2008-02-25 11:00:07 +01:00
|
|
|
register unsigned int v asm("$r10") = x;
|
|
|
|
asm ("fidxi\t[%0]\n" : : "r" (v) );
|
|
|
|
}
|
2011-01-17 21:26:30 +01:00
|
|
|
static inline void cris_fidx_d(unsigned int x)
|
|
|
|
{
|
2008-02-25 11:00:07 +01:00
|
|
|
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;
|
|
|
|
}
|