repo.or.cz
/
binutils-gdb.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
tc-i386.c fix for oss-fuzz gas fuzzing
[binutils-gdb.git]
/
sim
/
testsuite
/
sh
/
swap.s
blob
4dd6572695cbeb7b5481a80b927d0c04cd2b2065
1
# sh testcase for swap
2
# mach: all
3
# as(sh): -defsym sim_cpu=0
4
# as(shdsp): -defsym sim_cpu=1 -dsp
5
6
.include
"testutils.inc"
7
8
start
9
10
swapb
:
11
set_grs_a5a5
12
mov
#0x5a, r0
13
shll8
r0
14
or
#0xa5, r0
15
assertreg0
0x5aa5
16
17
swap.
b
r0
,
r1
18
assertreg
0xa55a
,
r1
19
20
test_gr_a5a5
r2
21
test_gr_a5a5
r3
22
test_gr_a5a5
r4
23
test_gr_a5a5
r5
24
test_gr_a5a5
r6
25
test_gr_a5a5
r7
26
test_gr_a5a5
r8
27
test_gr_a5a5
r9
28
test_gr_a5a5
r10
29
test_gr_a5a5
r11
30
test_gr_a5a5
r12
31
test_gr_a5a5
r13
32
test_gr_a5a5
r14
33
34
swapw
:
35
set_grs_a5a5
36
mov
#0x5a, r0
37
shll16
r0
38
or
#0xa5, r0
39
assertreg0
0x5a00a5
40
41
swap.w
r0
,
r1
42
assertreg
0xa5005a
,
r1
43
44
test_gr_a5a5
r2
45
test_gr_a5a5
r3
46
test_gr_a5a5
r4
47
test_gr_a5a5
r5
48
test_gr_a5a5
r6
49
test_gr_a5a5
r7
50
test_gr_a5a5
r8
51
test_gr_a5a5
r9
52
test_gr_a5a5
r10
53
test_gr_a5a5
r11
54
test_gr_a5a5
r12
55
test_gr_a5a5
r13
56
test_gr_a5a5
r14
57
58
pass
59
exit
0