sim: clean up stale AC_PREREQ refs
[deliverable/binutils-gdb.git] / sim / testsuite / sim / sh64 / compact / swapb.cgs
CommitLineData
cbb38b47
BE
1# sh testcase for swap.b $rm, $rn -*- Asm -*-
2# mach: all
3# as: -isa=shcompact
4# ld: -m shelf32
5
6 .include "compact/testutils.inc"
7
8 start
9
10init:
11 # Build up a distinctive bit pattern.
12 mov #1, r0
13 shll8 r0
14 add #12, r0
15 shll8 r0
16 add #85, r0
17 shll8 r0
18 add #70, r0
19
20test:
21 # Swap the lower two bytes into a different register.
22 swap.b r0, r1
23 mov #1, r7
24 shll8 r7
25 add #12, r7
26 shll8 r7
27 add #70, r7
28 shll8 r7
29 add #85, r7
30 cmp/eq r1, r7
31 bf wrong
32
33swapback:
34 # Swap the lower two bytes into the same registers.
35 # R0 should now equal R1.
36 swap.b r1, r2
37 cmp/eq r0, r2
38 bf wrong
39
40okay:
41 pass
42
43wrong:
44 fail
This page took 0.815128 seconds and 4 git commands to generate.