I just discovered Unicorn two days ago, so I'm still pretty new to it. I'm
using it to emulate some ARM Thumb instructions, but the status registers
aren't changing in a way that I would expect. I suspect that this is probably
an issue in the QEMU underneath Unicorn, but I thought that I should probably
ask here before diving into QEMU.
Here's some debug logging from my code:
INFO:arm_tester.arm_program: b656: 2b06 cmp r3, #6
INFO:arm_tester.arm_program: b658: bf8c ite hi
As you can see, the cmp instruction is changing the CPSR register (clears the Z
flag and sets the C), but the ite command is not. The IF-THEN-ELSE should be
setting IT[7:0] to the HI condition and then-else execution flags, but all
eight bits are zero before and after executing ite.
Can you verify that this is a QEMU issue? Or perhaps it's an error in Unicorn,
or perhaps it indicates that I have something configured wrong? I'm running
under Windows, if that's significant.