Using CPU flags in C
jh@clesse.com
jh@clesse.com
Tue Nov 18 13:22:10 GMT 2025
Hi,
I don't really know where to look for this information.
Is it possible to use the CPU status flags to communicate information
between inline assembly and the normal C control flow?
For example, an asm statement would set the Z flag and then the C code
would jump (for example with beq or bne in the case of ARM) without
using any additional variable and comparison instruction. Using a dummy
variable is no issue if the generated code is just the conditional
branch instruction.
Best regards,
JH
More information about the Gcc-help
mailing list