projects
/
sdk
/
emulator
/
qemu.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Tizen 2.1 base
[sdk/emulator/qemu.git]
/
tests
/
tcg
/
openrisc
/
test_addic.c
1
#include <stdio.h>
2
3
int main(void)
4
{
5
int a, b, c;
6
int result;
7
8
a = 1;
9
result = 0x1;
10
__asm
11
("l.addic %0, %0, 0xffff\n\t"
12
: "+r"(a)
13
);
14
if (a != result) {
15
printf("first addic error\n");
16
return -1;
17
}
18
19
a = 0x1;
20
result = 0x201;
21
__asm
22
("l.addic %0, %0, 0xffff\n\t"
23
"l.ori %0, r0, 0x100\n\t"
24
"l.addic %0, %0, 0x100\n\t"
25
: "+r"(a)
26
);
27
if (a != result) {
28
printf("second addic error\n");
29
return -1;
30
}
31
32
return 0;
33
}