Code Review
/
kvmfornfv.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
f5735228feadf52a965ebe51729f2bd4d0378772
[kvmfornfv.git]
/
test_sfles.c
1
#include <stdio.h>
2
3
int main(void)
4
{
5
int a, b;
6
int result;
7
8
a = 0;
9
b = 3;
10
result = 4;
11
__asm
12
("1:\n\t"
13
"l.addi %0, %0, 4\n\t"
14
"l.sfles %0, %1\n\t"
15
"l.bf 1b\n\t"
16
"l.nop\n\t"
17
: "+r"(a)
18
: "r"(b)
19
);
20
if (a != result) {
21
printf("sfles error\n");
22
return -1;
23
}
24
25
return 0;
26
}