summary refs log tree commit diff stats
path: root/results/classifier/gemma3:12b/assembly/1755479
blob: 78ee0848ae0c1d952d7e86aa1110a45abe2803ce (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Cortex M:qemu abort with optimized code and icount

A basic program runs fine if compiled with flag -O0 with gcc, but triggers a qemu abort when compiled with -O1 and run with icount:
"qemu: fatal: IO on conditional branch instruction"

I also noticed the problem on C source like this with -O0:
"int foo = *bar; bar++;" : OK
"int foo = *bar++;" : FAIL (!!!)

Optimized binary attached to this ticket.

command line:
qemu-system-arm -M lm3s6965evb -nographic -kernel hello.bin -serial file:$(tty) -icount 4 -cpu cortex-m4
(working fine without icount)

version: 
QEMU emulator version 2.11.50 (v2.11.0-2146-gd9bbfea-dirty)

Compilation options:
./configure --target-list=arm-softmmu --disable-slirp --disable-blobs --disable-docs --disable-guest-agent --disable-gnutls --disable-nettle --disable-gcrypt --disable-sdl --disable-gtk --disable-vnc --disable-virtfs --disable-mpath --disable-xen --disable-brlapi --disable-curl --disable-bluez --disable-kvm --disable-hax --disable-hvf --disable-whpx --disable-rdma --disable-vde --disable-netmap --disable-linux-aio --disable-cap-ng --disable-attr --disable-vhost-net --disable-spice --disable-rbd --disable-libiscsi --disable-libnfs --disable-smartcard --disable-libusb --disable-live-block-migration --disable-usb-redir --disable-lzo --disable-snappy --disable-bzip2 --disable-seccomp --disable-glusterfs --disable-tpm --disable-libssh2 --disable-numa --disable-libxml2 --disable-tcmalloc --disable-jemalloc --disable-replication --disable-vhost-vsock --disable-opengl --disable-virglrenderer --disable-xfsctl --disable-qom-cast-debug --disable-vxhs --disable-crypto-afalg --disable-vhost-user --disable-capstone --disable-pie --extra-cflags=-mtune=native

I have also tested previous versions:
- stock qemu-system-arm 2.5.0 from ubuntu 16.04: OK
- git version: QEMU emulator version 2.10.0 (v2.10.2-dirty): OK
- git version: QEMU emulator version 2.10.90 (v2.11.0-rc0-dirty): FAIL