Thanks for the answer.jahboater wrote: ↑Mon Jun 03, 2019 9:54 amNo.
Thumb-2 is a mix of 16-bit and 32-bit wide instructions (with 32-bit address space etc, registers called Rx).
GCC will not generate thumb2 unless you specifically request it with -mthumb (and that will not be possible in AArch64 mode).
I tried that with GCC. When doing objdump on the file, it's identical to the other assembly code. Still uses 32-bit instruskjon. I find that strange as all the assembly code I've done with AArch64 be it on Ubuntu, cross-compiled, or after trying your example, uses the AArch64 registersOn the Pi3/Ubuntu/64-bit what does -march=native -mtune=native emit?
Should be A64 assembler.
Code: Select all
#if __aarch64__ == 1 #pragma message "VALID AARCH64 COMPILER" #else #error NOT AN AARCH64 COMPILER #endif
I should do this in a shell script with no additional statements than that code? And that will check if GCC can do AArch64 compiling?You can also pick it at compile time as any aarch64 compiler has a defined macro
__aarch64__ == 1
Just do and #if test on it
Code: Select all
aarch64-linux-gnu-gcc test.c -g -o -mcpu=cortex-a53+fp+simd test1
What is the problem then? What flag should I use instead?unrecognised emulation mode: cpu=aarch64linux
Build platform: Architecture of the build machine
Host platform: The architecture you are building for
Target platform: The architecture that will run the binary output of the compilation
ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-, for GNU/Linux 3.7.0, BuildID[sha1]=f2f9e86d8f4c72a4865b01bb97a95f5fc88e6859, with debug_info, not stripped
What does "8-hex" mean?