binutils-gdb/sim/testsuite/example-synacor/push-pop.s
Mike Frysinger 26da232cbd sim: example-synacor: a simple implementation for reference
Provide a simple example simulator for people porting to new targets
to use as a reference.  This one has the advantage of being used by
people and having a fun program available for it.

It doesn't require a special target -- the example simulators can be
built for any existing port.
2021-04-03 16:19:16 -04:00

23 lines
217 B
ArmAsm

# check the PUSH & POP insns.
# mach: example
.include "testutils.inc"
start
JMP 3
HALT
PUSH 1
SET r0, 3
PUSH r0
POP r1
POP r2
EQ r7, r0, 3
JF r7, 2
EQ r7, r1, 3
JF r7, 2
EQ r7, r2, 1
JF r7, 2
pass