diff options
Diffstat (limited to 'qemu/tests/tcg/mips/mips32-dsp/mthi.c')
-rw-r--r-- | qemu/tests/tcg/mips/mips32-dsp/mthi.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/qemu/tests/tcg/mips/mips32-dsp/mthi.c b/qemu/tests/tcg/mips/mips32-dsp/mthi.c new file mode 100644 index 000000000..43a80669d --- /dev/null +++ b/qemu/tests/tcg/mips/mips32-dsp/mthi.c @@ -0,0 +1,21 @@ +#include<stdio.h> +#include<assert.h> + +int main() +{ + int achi, acho; + int result; + + achi = 0x004433; + result = 0x004433; + + __asm + ("mthi %1, $ac1\n\t" + "mfhi %0, $ac1\n\t" + : "=r"(acho) + : "r"(achi) + ); + assert(result == acho); + + return 0; +} |