I had a moan about this on iconbar.com, and got a very helpful reply. https://www.iconbar.com/forums/viewthread.php?threadid=11474&page=1#124378 Long story short: the outputs should be labelled "early-clobber" ("=&r") so that they don't re-use input registers. "The compiler does not analyse the text in the asm block at all. The compiler models the inline asm as a sequence of read all inputs do something write all outputs So the writes of the output registers overwrite ("clobber") the previous content...
Debugging bare metal code for RPi3 using Qemu
Debugging bare metal code for RPi3 using Qemu
Debugging bare metal code for RPi3 using Qemu
Working with gcc-6.3
Bare metal code on a Raspberry Pi 3
Debugging bare metal code for RPi3 using Qemu
Bare metal code on a Raspberry Pi 3