Hi,
I am working with cortex-r52 CPU, compiler toos is arm-none-eabi-gcc , I need to use The ARM-state integer division instructions in my code. Does cortex-r52 supports integer divide? If yes can you please let me know how to set integer division compiler option in my build configuration for GCC?
I tried with CCFLAGS+= -marm -mthumb -mcpu=cortex-r52+idev
with this option I am getting error: unrecognized argument in option '-mcpu=cortex-r52+idev'
Please help me to set the idev flag in compiler option/
Thanks Ronan for the reply.
If parameter a is of type unsigned long long (64bit), then will the divide applies udiv or does it execute some lib?
Thanks,
Jahnvi.
UDIV (and SDIV) operate on 32-bit values only.
Changing to long long, at least for armclang, does indeed invoke a library routine. I'm sure gcc does similar.
bar 0x00000000: e92d4800 .H-. PUSH {r11,lr} 0x00000004: ebfffffe .... BL __aeabi_uldivmod 0x00000008: e8bd8800 .... POP {r11,pc}
ok Thank you