binutils-gdb/sim/testsuite/d10v/t-rep.s
Mike Frysinger 1368b914e9 sim: testsuite: flatten tree
Now that all port tests live under testsuite/sim/*/, and none live
in testsuite/ directly, flatten the structure by moving all of the
dirs under testsuite/sim/ to testsuite/ directly.

We need to stop passing --tool to dejagnu so that it searches all
dirs and not just ones that start with "sim".  Since we have no
other dirs in this tree, and no plans to add any, should be fine.
2021-01-15 19:18:34 -05:00

50 lines
622 B
ArmAsm

# mach: all
# output:
# sim: --environment operating
.include "t-macros.i"
start
;; Check that the instruction @REP_E is executed when it
;; is reached using a branch instruction
ldi r2, 1
test_rep_1:
rep r2, end_rep_1
nop || nop
nop || nop
nop || nop
nop || nop
ldi r3, 46
bra end_rep_1
ldi r3, 42
end_rep_1:
addi r3, 1
check 1 r3 47
;; Check that the loop is executed the correct number of times
ldi r2, 10
ldi r3, 0
ldi r4, 0
test_rep_2:
rep r2, end_rep_2
nop || nop
nop || nop
nop || nop
nop || nop
nop || nop
addi r3, 1
end_rep_2:
addi r4, 1
check 2 r3 10
check 3 r4 10
exit0