Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22237

How to test the cpu variant in Gnu asssembler

$
0
0

I would like to implement some assembly code differently depending on the cpu variant I am assembling for.I am currently compiling for ARM, and the cpu variant is passed through the "-mcpu" option of GCC. My question is on how to test the variant when in assembly code?

I know how to declare the variant using the .cpu directive (eg. .cpu cortex-m3), but I would like to use different instructions depending on the target core. I think I can do .ifeq , but I was unable to see what to put in the condition field. Does anyone know about this?


Viewing all articles
Browse latest Browse all 22237

Trending Articles