diff options
| author | Aleksandar Markovic <amarkovic@wavecomp.com> | 2019-01-22 16:53:00 +0100 |
|---|---|---|
| committer | Aleksandar Markovic <amarkovic@wavecomp.com> | 2019-01-24 17:48:33 +0100 |
| commit | 073d9f2ce051d7a4bad9aa7bfdacf97394c57c05 (patch) | |
| tree | d7ebbc66d7a95c4e04f9b72d5233d363139390e6 /tests/tcg/mips/user/ase/dsp/test_dsp_r2_append.c | |
| parent | b304981f52d2dd4ef4322fa90d1732611e9c5c45 (diff) | |
| download | focaccia-qemu-073d9f2ce051d7a4bad9aa7bfdacf97394c57c05.tar.gz focaccia-qemu-073d9f2ce051d7a4bad9aa7bfdacf97394c57c05.zip | |
tests: tcg: mips: Move source files to new locations
MIPS TCG test will be organized by ISAs and ASEs in future. Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Diffstat (limited to 'tests/tcg/mips/user/ase/dsp/test_dsp_r2_append.c')
| -rw-r--r-- | tests/tcg/mips/user/ase/dsp/test_dsp_r2_append.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/tcg/mips/user/ase/dsp/test_dsp_r2_append.c b/tests/tcg/mips/user/ase/dsp/test_dsp_r2_append.c new file mode 100644 index 0000000000..9a91e1650d --- /dev/null +++ b/tests/tcg/mips/user/ase/dsp/test_dsp_r2_append.c @@ -0,0 +1,30 @@ +#include<stdio.h> +#include<assert.h> + +int main() +{ + int rs, rt; + int result; + + rs = 0xFF0055AA; + rt = 0x0113421B; + result = 0x02268436; + __asm + ("append %0, %1, 0x01\n\t" + : "+r"(rt) + : "r"(rs) + ); + assert(rt == result); + + rs = 0xFFFF0FFF; + rt = 0x00010111; + result = 0x0010111F; + __asm + ("append %0, %1, 0x04\n\t" + : "+r"(rt) + : "r"(rs) + ); + assert(rt == result); + + return 0; +} |