2010-04-19 08:25 AM
Conditional Assembly instruction in C
2011-05-17 04:47 AM
I'm assuming you're using an stm32 processor, which only implements the Thumb-2 ISA (not Thumb or ARM).
Thumb-2 doesn't support conditional suffixes on all instructions, but it does give an IT instruction that can be used to subject the following instructions to conditional execution.2011-05-17 04:47 AM
Thanks. I've been looking everywhere for detailed info and examples on how to use the IT instruction. Can someone please show how the 3-instruction sequence below must be rewritten using the IT instruction.
sub r0, r1, r0 movmi r0, #0 movpl r0, #1