]>
Commit | Line | Data |
---|---|---|
cbb38b47 BE |
1 | # sh testcase for mov.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 | mov #30, r1 | |
11 | shll8 r1 | |
12 | # Preserve. | |
13 | mov r1, r7 | |
14 | init: | |
15 | # Build up a distinctive bit pattern. | |
16 | mov #1, r2 | |
17 | shll8 r2 | |
18 | add #12, r2 | |
19 | store: | |
20 | mov.w r2, @-r1 | |
21 | check: | |
22 | # Read it back. | |
23 | mov.w @r1, r3 | |
24 | shll16 r2 | |
25 | shll16 r3 | |
26 | cmp/eq r2, r3 | |
27 | bf wrong | |
28 | dec: | |
29 | add #2, r1 | |
30 | cmp/eq r7, r1 | |
31 | bf wrong | |
32 | ||
33 | okay: | |
34 | pass | |
35 | wrong: | |
36 | fail |