Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.
We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.
Thank you for your understanding.
Hi,
I am using "gcc-arm-none-eabi-4_9-2015q1" to compile ARMv8 - A53/A57 code and getting following errors while compiling assembly files -
I am giving -march='armv8-a' option. I am not sure how to resolve this ?
Assembler messages: Error: bad instruction `stp x4,x5,[sp,#-16]!' Error: ARM register expected -- `ldr x4,=0xff000004eeaa4400' Error: selected processor does not support requested special purpose register -- `msr mair_el2,x4' Error: ARM register expected -- `ldr x4,=0x80002500' Error: selected processor does not support requested special purpose register -- `msr tcr_el2,x4' Error: ARM register expected -- `mov x4,x0' Error: selected processor does not support requested special purpose register -- `msr ttbr0_el2,x4' Error: bad instruction `tlbi alle2'
Previously I was using Linaro toolchain "gcc-linaro-aarch64-none-elf-4.9-2014.07_linux" but I am facing issue where it is generating some bad code.
I tried resolving that but it doesn't seems to be my code problem so I wanted to give a shot with other gcc toolchain. Also both gcc toochains doesn't accept -march=armv8-a option or mcpu option.
Does any one know what are the correct parameters and best gcc toolchain to use ?
Thanks
That's the tools for the 32 bit architecture rather than the 64 bit one. The armv8-a option won't select aarch64 - it'll just enable load-acquire and suchlike that are added to the 32 bit instruction set with armv8. I haven't the foggiest where it got those messages from!
As daith mentioned, you are using the wrong cross compiler. The one you are using is compiling for ARMv7 (well, ARMv8-A AArch32 with the flags you've provided), but your assembly code is using ARMv8-A AArch64 instructions and registers.
Go to this page to download the correct AArch64 cross compiler.
If your host PC is running Windows, you will want the ".tar.xz" file containing "i686_mingw32" in its name, for example at time of writing: gcc-linaro-7.3.1-2018.05-i686-mingw32_aarch64-linux-gnu.tar.xz
Or if your host PC is running Linux, you will wantthe ".tar.xz" file containing "x86_64" in its name, for example at time of writing: gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
I hope this helps,
Ash.