repo.or.cz
/
qemu
/
ar7.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
hw/mips/gt64xxx: Fix typos in qemu_log_mask() formats
[qemu/ar7.git]
/
tests
/
tcg
/
xtensa
/
test_sext.S
blob
483d2176e421f6d74312ca092058ae99b91068b7
1
#include "macros.inc"
2
3
test_suite sext
4
5
#if XCHAL_HAVE_SEXT
6
7
test sext
8
movi a2, 0xffffff5a
9
movi a3, 0x0000005a
10
sext a4, a2, 7
11
assert eq, a3, a4
12
13
movi a2, 0x000000a5
14
movi a3, 0xffffffa5
15
sext a4, a2, 7
16
assert eq, a3, a4
17
18
movi a2, 0xfffffaa5
19
movi a3, 0x000000a5
20
sext a4, a2, 8
21
assert eq, a3, a4
22
23
movi a2, 0x0000055a
24
movi a3, 0xffffff5a
25
sext a4, a2, 8
26
assert eq, a3, a4
27
28
movi a2, 0xffff5a5a
29
movi a3, 0x00005a5a
30
sext a4, a2, 15
31
assert eq, a3, a4
32
33
movi a2, 0x0000a5a5
34
movi a3, 0xffffa5a5
35
sext a4, a2, 15
36
assert eq, a3, a4
37
38
movi a2, 0x00055a5a
39
movi a3, 0xffff5a5a
40
sext a4, a2, 16
41
assert eq, a3, a4
42
43
movi a2, 0x000aa5a5
44
movi a3, 0x0000a5a5
45
sext a4, a2, 16
46
assert eq, a3, a4
47
48
movi a2, 0x005a5a5a
49
movi a3, 0xffda5a5a
50
sext a4, a2, 22
51
assert eq, a3, a4
52
53
movi a2, 0xffa5a5a5
54
movi a3, 0x0025a5a5
55
sext a4, a2, 22
56
assert eq, a3, a4
57
test_end
58
59
test sext_same_rs
60
movi a2, 0xffffff5a
61
movi a3, 0x0000005a
62
sext a2, a2, 7
63
assert eq, a3, a2
64
65
movi a2, 0x000000a5
66
movi a3, 0xffffffa5
67
sext a2, a2, 7
68
assert eq, a3, a2
69
test_end
70
71
#endif
72
73
test_suite_end