Is MOV r0, r0 expected in thumb arithmetic.asm
Closed this issue · 3 comments
Deleted user commented
Hey,
In https://github.com/jsmolka/gba-tests/blob/master/thumb/arithmetic.asm, on line 128, is the (trivial?) instruction "mov r0, r0" instruction expected ?
Is the instruction a typo i.e., should it be "mov r0, 0" (or something like it) to make more sense in the context of the test ?
Thanks,
Revanth
jsmolka commented
It's just a way to set r0 to 0xFFFF'FFFF.
mov r0, 0 ; r0 = 0
mvn r0, r0 ; r0 = ~r0
Then we add 1, wich causes an overflow and sets the carry.
Deleted user commented
Thanks for the explanation @jsmolka.
Deleted user commented
Hi @jsmolka ,
Just FYI - I've added an acknowledgement and link to your repo from my project here. ZAP Project Link
See Section 5 in the README.
Thanks,
Revanth