Commit 1b893ef3269532c5b438237da599d338b33b75d0
1 parent
5d4a534d
Add testcase for CRIS ftag/fidx cache flushing insns.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3991 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
34 additions
and
0 deletions
tests/cris/Makefile
tests/cris/check_ftag.c
0 → 100644
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 | +} | ... | ... |