This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to choose GCC options for Neon r0p4

ARM cumunity,

We are design a SOC with Neon (r0p4) integrated. I saw the GCC have multiple options for Neon:

Known ARM FPUs (for use with the -mfpu= option):
auto crypto-neon-fp-armv8 fp-armv8 fpv4-sp-d16 fpv5-d16 fpv5-sp-d16 neon
neon-fp-armv8 neon-fp16 neon-vfpv3 neon-vfpv4 vfp vfp3 vfpv2 vfpv3 vfpv3-d16
vfpv3-d16-fp16 vfpv3-fp16 vfpv3xd vfpv3xd-fp16 vfpv4 vfpv4-d16

gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))

The SOC integration engineer also don't know how to choose from them for best match of our HW. Can you help us? Thanks in advance.

BR

/Li

Parents
  • Hi Li,

    if your SOC is based on Cortex-A53 then indeed neon-fp-armv8 is an appropriate -mfpu option. However, you can also use '-mcpu=cortex-a53 -mfpu=auto -mfloat-abi=hard', the float-abi might not be necessary if you are using a toolchain that has hard float on by default.

    Traditionally we enable almost all extensions for a cpu when you use -mcpu= option, this means that they will have the appropriate FPU set though you must set -mfpu=auto to guarantee that works! I believe that  passing '-mcpu=cortex-a53 -mfpu=auto' is practically the same as passing '-march=armv8-a+crc -mfpu=neon-fp-armv8 -mtune=cortex-a53'.

    Hope this helps.

    Kind Regards,
    Andre

Reply
  • Hi Li,

    if your SOC is based on Cortex-A53 then indeed neon-fp-armv8 is an appropriate -mfpu option. However, you can also use '-mcpu=cortex-a53 -mfpu=auto -mfloat-abi=hard', the float-abi might not be necessary if you are using a toolchain that has hard float on by default.

    Traditionally we enable almost all extensions for a cpu when you use -mcpu= option, this means that they will have the appropriate FPU set though you must set -mfpu=auto to guarantee that works! I believe that  passing '-mcpu=cortex-a53 -mfpu=auto' is practically the same as passing '-march=armv8-a+crc -mfpu=neon-fp-armv8 -mtune=cortex-a53'.

    Hope this helps.

    Kind Regards,
    Andre

Children
No data