Merge tag 'qemu-macppc-20230206' of https://github.com/mcayland/qemu into staging
[qemu.git] / tests / tcg / mips / user / ase / dsp / test_dsp_r1_maddu.c
blobaf4bfcfe9df315a117f03110cdf792f45a5475a4
1 #include<stdio.h>
2 #include<assert.h>
4 int main()
6 int rt, rs;
7 int achi, acli;
8 int acho, aclo;
9 int resulth, resultl;
11 achi = 0x05;
12 acli = 0xB4CB;
13 rs = 0x01;
14 rt = 0x01;
15 resulth = 0x05;
16 resultl = 0xB4CC;
18 __asm
19 ("mthi %2, $ac1\n\t"
20 "mtlo %3, $ac1\n\t"
21 "madd $ac1, %4, %5\n\t"
22 "mfhi %0, $ac1\n\t"
23 "mflo %1, $ac1\n\t"
24 : "=r"(acho), "=r"(aclo)
25 : "r"(achi), "r"(acli), "r"(rs), "r"(rt)
27 assert(resulth == acho);
28 assert(resultl == aclo);
30 return 0;