repo.or.cz
/
qemu.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into staging
[qemu.git]
/
tests
/
xtensa
/
test_clamps.S
blob
c186cc98d840a7c38c56acfb1ad39e709ced028e
1
.include "macros.inc"
2
3
test_suite clamps
4
5
test clamps
6
movi a2, 0
7
movi a3, 0
8
clamps a4, a2, 7
9
assert eq, a3, a4
10
11
movi a2, 0x7f
12
movi a3, 0x7f
13
clamps a4, a2, 7
14
assert eq, a3, a4
15
16
movi a2, 0xffffff80
17
movi a3, 0xffffff80
18
clamps a4, a2, 7
19
assert eq, a3, a4
20
21
movi a2, 0x80
22
movi a3, 0x7f
23
clamps a2, a2, 7
24
assert eq, a3, a2
25
26
movi a2, 0xffffff7f
27
movi a3, 0xffffff80
28
clamps a2, a2, 7
29
assert eq, a3, a2
30
31
movi a2, 0x7fffffff
32
movi a3, 0x7f
33
clamps a2, a2, 7
34
assert eq, a3, a2
35
36
movi a2, 0x80000000
37
movi a3, 0xffffff80
38
clamps a2, a2, 7
39
assert eq, a3, a2
40
test_end
41
42
test_suite_end