projects
/
external
/
binutils.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Support R_SPARC_WDISP10 and R_SPARC_H34.
[external/binutils.git]
/
sim
/
testsuite
/
sim
/
sh64
/
compact
/
swapw.cgs
1
# sh testcase for swap.w $rm, $rn -*- Asm -*-
2
# mach: all
3
# as: -isa=shcompact
4
# ld: -m shelf32
5
6
.include "compact/testutils.inc"
7
8
start
9
10
.global swapw
11
swapw:
12
# Build up a characteristic bit pattern in R0.
13
mov #85, r0
14
shll16 r0
15
add #3, r0
16
rotr r0
17
rotr r0
18
or #170, r0
19
# Preserve for later.
20
mov r0, r8
21
22
test:
23
swap.w r0, r1
24
mov #64, r0
25
shll8 r0
26
or #170, r0
27
shll8 r0
28
or #192, r0
29
shll8 r0
30
or #21, r0
31
cmp/eq r1, r0
32
bf wrong
33
34
swapback:
35
swap.w r1, r2
36
cmp/eq r2, r8
37
bf wrong
38
39
okay:
40
pass
41
42
wrong:
43
fail