# sh testcase for mov.b $rm, @-$rn -*- Asm -*- | |
# mach: all | |
# as: -isa=shcompact | |
# ld: -m shelf32 | |
.include "compact/testutils.inc" | |
start | |
mov #40, r1 | |
shll8 r1 | |
mov #55, r2 | |
# Save ADDR, DATA. | |
mov r1, r7 | |
mov r2, r8 | |
# Do the move. | |
mov.b r2, @-r1 | |
# Load the value back into r3. | |
mov.b @r1, r3 | |
cmp/eq r2, r3 | |
bf wrong | |
# Ensure that r1 has been decremented. | |
mov #1, r0 | |
sub r0, r7 | |
cmp/eq r7, r1 | |
bf wrong | |
okay: | |
pass | |
wrong: | |
fail |