]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/testsuite/sim/sh64/compact/movb2.cgs
* Contribute Hitachi SH5 simulator.
[thirdparty/binutils-gdb.git] / sim / testsuite / sim / sh64 / compact / movb2.cgs
1 # sh testcase for mov.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 mov #40, r1
10 shll8 r1
11 mov #55, r2
12
13 # Save ADDR, DATA.
14 mov r1, r7
15 mov r2, r8
16
17 # Do the move.
18 mov.b r2, @-r1
19
20 # Load the value back into r3.
21 mov.b @r1, r3
22 cmp/eq r2, r3
23 bf wrong
24
25 # Ensure that r1 has been decremented.
26 mov #1, r0
27 sub r0, r7
28 cmp/eq r7, r1
29 bf wrong
30
31 okay:
32 pass
33 wrong:
34 fail