s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips32-dsp / lhx.c
blob10be3b385fee95c6f5d012ecb004f6fdb1cc80cb
1 #include <stdio.h>
2 #include <assert.h>
4 int main(void)
6 int value, rd;
7 int *p;
8 unsigned long addr, index;
9 int result;
11 value = 0xBCDEF389;
12 p = &value;
13 addr = (unsigned long)p;
14 index = 0;
15 result = 0xFFFFF389;
16 __asm
17 ("lhx %0, %1(%2)\n\t"
18 : "=r"(rd)
19 : "r"(index), "r"(addr)
22 assert(rd == result);
24 return 0;