diff options
author | Fathi Boudra <fathi.boudra@linaro.org> | 2012-12-25 16:58:54 +0200 |
---|---|---|
committer | Fathi Boudra <fathi.boudra@linaro.org> | 2012-12-25 16:58:54 +0200 |
commit | 17d4e9b1e2d6d32da51278a4165621af99bade02 (patch) | |
tree | 476579c2abd0da7fe508815b6bc7bcd5037193df /tests/tcg/mips/mips64-dsp/shll_qb.c | |
parent | dd55a01d2af35f5e9dabb2b745770afd008c9e24 (diff) |
Imported Upstream version 1.3.0-2012.12upstream/1.3.0-2012.12
Diffstat (limited to 'tests/tcg/mips/mips64-dsp/shll_qb.c')
-rw-r--r-- | tests/tcg/mips/mips64-dsp/shll_qb.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/tcg/mips/mips64-dsp/shll_qb.c b/tests/tcg/mips/mips64-dsp/shll_qb.c new file mode 100644 index 0000000..c21ab66 --- /dev/null +++ b/tests/tcg/mips/mips64-dsp/shll_qb.c @@ -0,0 +1,26 @@ +#include "io.h" + +int main(void) +{ + long long rd, rt, dsp; + long long result, resultdsp; + + rt = 0x87654321; + result = 0x38281808; + resultdsp = 0x01; + + __asm + ("shll.qb %0, %2, 0x03\n\t" + "rddsp %1\n\t" + : "=r"(rd), "=r"(dsp) + : "r"(rt) + ); + dsp = (dsp >> 22) & 0x01; + if (rd != result) { + printf("shll.qb wrong\n"); + + return -1; + } + + return 0; +} |