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

compiler optimization options for ARMv8 GCC compiler on ARM cortex a53 (bare metal application)

I am using ARMv8 GCC compiler(aarch64-none-elf-gcc) for my bare metal application on ARM cortex a53. I am using neon intrinsics with plain C in my code so I would like to ensure to use all optimization option available for this compiler.

I tried -mfpu = neon but compiler is not recognizing it. So, what are the possible optimization option available for my application setting. I am using Xilinx SDK  IDE for my application.

Parents
  • gcc 9.1.0

    Guess that answers your question:

    arm-none-eabi-gcc -mgeneral-regs-only -march=armv7-a -mfpu=vfpv3 -S float.c -mfloat-abi=hard
    float.c: In function 'res':
    float.c:1:5: error: argument of type 'float' not permitted with -mgeneral-regs-only
        1 | int res(float a, float b)
          |     ^~~

Reply
  • gcc 9.1.0

    Guess that answers your question:

    arm-none-eabi-gcc -mgeneral-regs-only -march=armv7-a -mfpu=vfpv3 -S float.c -mfloat-abi=hard
    float.c: In function 'res':
    float.c:1:5: error: argument of type 'float' not permitted with -mgeneral-regs-only
        1 | int res(float a, float b)
          |     ^~~

Children
No data