NAME=ELF: m68k.elf
BROKEN=1
FILE=bins/elf/analysis/busybox.m68k
CMDS=<<EOF
# This test is broken. The reason is that Rizin can't distinguish
# CPU models. Each M68k model has a different address mask (32-24 bits).
# It defaults to one which has only 24bits.
# Hence, the subi.l instruction decodes to
# `subi.l 0x15b119, d0` instead of `subi.l 0x8015b119, d0`
# Should be fixable with RzArch (if anyone is still intereses).
# See: https://github.com/rizinorg/rizin/issues/4334
# And https://github.com/rizinorg/rizin/issues/4681
f sym.init @ 0x80001a30
f sym.fini @ 0x800019b0
f sub.exit @ 0x80001450
pi 20
EOF
EXPECT=<<EOF
suba.l a6, a6
move.l (a7)+, d0
movea.l a7, a0
pea.l (a7)
pea.l (a1)
pea.l sym.init
pea.l sym.fini
pea.l (a0)
move.l d0, -(a7)
pea.l 0x800963de.l
invalid
ori.b 0x8a, d0
illegal 0x4afc
link.w a6, 0x0
move.l 0x8015b11c, d0
subi.l 0x15b119, d0
moveq 0x6, d1
cmp.l d0, d1
bcc.b 0x80000df6
lea.l 0x0.l, a0
EOF
RUN
