hw/arm/smmuv3: Fix IIDR offset
[qemu/ar7.git] / tests / tcg / openrisc / test_addic.c
blob857aaa133025defc8014ab20f34e8c5e4b49d4f6
1 #include <stdio.h>
3 int main(void)
5 int a, b, c;
6 int result;
8 a = 1;
9 result = 0x0;
10 __asm
11 ("l.add r1, r1, r0\n\t" /* clear carry */
12 "l.addic %0, %0, 0xffff\n\t"
13 : "+r"(a)
15 if (a != result) {
16 printf("first addic error\n");
17 return -1;
20 a = -1;
21 result = 0x201;
22 __asm
23 ("l.add r1, r1, r0\n\t" /* clear carry */
24 "l.addic %0, %0, 0x1\n\t"
25 "l.ori %0, r0, 0x100\n\t"
26 "l.addic %0, %0, 0x100\n\t"
27 : "+r"(a)
29 if (a != result) {
30 printf("second addic error\n");
31 return -1;
34 return 0;