Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git] / tests / tcg / openrisc / test_sflesi.c
blob16fe6053e57848f9a9446acbb6f7a7abd837c16f
1 #include <stdio.h>
3 int main(void)
5 int a;
6 int result;
8 a = 0;
9 result = 4;
10 __asm
11 ("1:\n\t"
12 "l.addi %0, %0, 4\n\t"
13 "l.sflesi %0, 0x3\n\t"
14 "l.bf 1b\n\t"
15 "l.nop\n\t"
16 : "+r"(a)
18 if (a != result) {
19 printf("sflesi error\n");
20 return -1;
23 a = 0;
24 result = 4;
25 __asm
26 ("1:\n\t"
27 "l.addi %0, %0, 1\n\t"
28 "l.sflesi %0, 0x3\n\t"
29 "l.bf 1b\n\t"
30 "l.nop\n\t"
31 : "+r"(a)
33 if (a != result) {
34 printf("sflesi error\n");
35 return -1;
38 return 0;