ADD instruction
Martin Avison (27) 1494 posts |
Clarification please: what does the ADD instruction do in the case of ADD r15,r15,r0 when r0 happens to (wrongly) end in 0xF ? I have been chasing an obscure bug which I think is caused by this error in a jump table, resulting in a branch to strange places (usually followed by Data Abort), and also weird aborts afterwards in unrelated things until re-boot. The strange branches do not happen on my Iyonix or my RPi, but do on a users IMX6. From my reading of some docs, it appears that this case is ‘unpredictable’, and may end up in Thumb mode. Anyone confirm please? |
Clive Semmens (2335) 3276 posts |
In v7 it should definitely end up in ThumbEE State – not Thumb State (no such thing as Thumb mode…) Before v7 it was nominally unpredictable, but in practice the bottom bits were ignored on most if not all silicon. (I know nuffink about anything post v7.) |