qapi/error: Check format string argument in error_*prepend()
[qemu/armbru.git] / tests / tcg / openrisc / test_addi.c
blobbbf5a5ffab51ea4f8157577b6937446c991569e7
1 #include <stdio.h>
3 int main(void)
5 int a, b;
6 int result;
8 b = 0x01;
9 result = 0x00;
10 __asm
11 ("l.addi %0, %1, 0xffff\n\t"
12 : "=r"(a)
13 : "r"(b)
15 if (a != result) {
16 printf("addi error\n\t");
17 return -1;
20 b = 0x010000;
21 result = 0xffff;
22 __asm
23 ("l.addi %0, %1, 0xffff\n\t"
24 : "=r"(a)
25 : "r"(b)
27 if (a != result) {
28 printf("addi error\n");
29 return -1;
32 return 0;