mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-06 12:09:26 +08:00
26da232cbd
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.
25 lines
251 B
ArmAsm
25 lines
251 B
ArmAsm
# check the ADD insn.
|
|
# mach: example
|
|
|
|
.include "testutils.inc"
|
|
|
|
start
|
|
JMP 3
|
|
HALT
|
|
|
|
SET r2, 2
|
|
ADD r2, r2, r2
|
|
EQ r3, r2, 4
|
|
JF r3, 2
|
|
|
|
ADD r1, 100, r2
|
|
EQ r4, r1, 104
|
|
JF r4, 2
|
|
|
|
# 0x7ffe == -2
|
|
ADD r0, r1, 0x7ffe
|
|
EQ r4, r0, 102
|
|
JF r4, 2
|
|
|
|
pass
|