gcc - ARM overflow flag -
i read here, overflow flag might set in cases. trying out following sample of code :-
.global main .func main main: mov r0, #4026531839 mov r1, #-1 sub r0, r0, r1 os is_set mov r0, #17 bx lr is_set: mov r0, #71 bx lr
i got error message said following :-
carryflagsub.s: assembler messages: carryflagsub.s:8: error: bad instruction `os is_set'
isn't os
instruction used test if overflow flag set?
there no os
instruction in arm instruction set. however, test if overflow flag set can use conditional execution of instructions, that.
bvs is_set
you can learn conditional execution in arm reference manual.
Comments
Post a Comment