Olórin
Olórin

Reputation: 3834

Differences between arm64 and aarch64

I have two "unlocked" devices, an iPad mini 3, and a Galaxy Edge 6, both endowed with a terminal and a minimalistic set of unix commands. I thought both devices have arm64 processors but when I ran

uname -a

on both devices I got the following :

for the iPad mini 3 :

xxxxs-iPad:/var/mobile root# uname -a
Darwin xxxx-iPad 14.0.0 Darwin Kernel Version 14.0.0: Wed Jun 24 00:50:15 PDT 2015; root:xnu-2784.30.7-30/RELEASE_ARM64_S5L8960X iPad4, **arm64**, J85mAP

for the Samsung Galaxy s6 Edge :

u0_a203@zerolte:/ $ uname -a
Linux localhost 3.10.61-4497415 #1 SMP PREEMPT Thu Apr 9 15:06:40 KST 2015 **aarch64** GNU/Linux

If I am not wrong, the last info in both case, J85mAP and GNU/Linux, stand for firmwares, and the antepenultimate infos, arm64 and aarch64, stand for the processors.

My questions are the following : obviously the strings "arm64" and "aarch64" are not the same, but I always thought arm64 and aarch64 were the same. (It's even told when you put the arm64 tag to a question here.)

So, are they really identical?

Especially, what should I worry about in case of cross-building libraries for both targets ? In fact, I have gcc 5.2.0 in mind, but maybe also lower versions. Can I just pass

-target=arm64

or

-target=aarch64

according to which device I target and just worry about the rest of options to configure?

EDIT Hum, look for this again, without success.

Upvotes: 260

Views: 310657

Answers (5)

pelotasplus
pelotasplus

Reputation: 10062

It seems that ARM64 was created by Apple and AARCH64 by the others, most notably GNU/GCC guys.

After some googling I found this link:

The LLVM 64-bit ARM64/AArch64 Back-Ends Have Merged

So it makes sense, iPad calls itself ARM64, as Apple is using LLVM, and Edge uses AARCH64, as Android is using GNU GCC toolchain.

Upvotes: 97

Kyrill
Kyrill

Reputation: 3819

"AArch64" and "ARM64" refer to the same thing.

AArch64 is the 64-bit state introduced in the Armv8-A architecture. The 32-bit state which is backwards compatible with Armv7-A and previous 32-bit Arm architectures is referred to as AArch32. Therefore the GNU triplet for the 64-bit ISA is aarch64. The Linux kernel community chose to call their port of the kernel to this architecture arm64 rather than aarch64, so that's where some of the arm64 usage comes from.

The Apple-developed backend for AArch64 was called "ARM64" whereas the LLVM community-developed backend was called "AArch64" (as it is the canonical name for the 64-bit ISA). The two were merged in 2014 and the backend now is called "AArch64".

Upvotes: 296

user3064538
user3064538

Reputation:

"AArch64" is the official name, it means "Arm Architecture 64-bit".

"arm64" is an unofficial name some people use because the official name sucks.

Originally there was just the 32-bit architecture, called "ARM". Then in October 2011 the ARMv8-A spec added a new 64-bit execution state called "AArch64", retroactively renaming the old 32-bit architecture "AArch32". Then to add a bit more confusion, in 2017 the company rebranded from being called "ARM" (an acronym for "Advanced RISC Machines") to just "Arm".

Support for AArch64 was added to Linux in 2012. The patchset was initially called "aarch64" but was renamed to "arm64". The LLVM community and Apple started working in parallel to support it in clang in 2012, the LLVM community called it "aarch64" and Apple called it "arm64". Apple open-sourced their changes and the two efforts lived together in LLVM under their different names and were eventually merged in 2014 so LLVM/clang now just calls it "aarch64".

Upvotes: 14

Butch
Butch

Reputation: 15

It is easy to make the mistake that they are not the same. I have a library from Maxim Integrated developed presumably with GNU toolchain (aarch64). It is completely unusable in the XCode development environment for arm64. The MacBook Pro is model A1278. XCode is version 12.4. macOS Catalina v10.15.7. The ld command on the Mac will indicate that we are trying to link with an unknown-unsupported file format. Further investigation shows that the Maxim library, created with the ar command I believe, needs to be modified by running ranlib on it. At first I thought this was an aarch64 vs arm64 issue; I was wrong.

Upvotes: -3

user1133275
user1133275

Reputation: 2734

GCC thinks they differ;

https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html

https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html

LLVM thinks they are the same;

https://www.phoronix.com/scan.php?page=news_item&px=MTY5ODk

Linux thinks they are the same;

find ./* -name aarch64
./tools/testing/selftests/kvm/lib/aarch64
./tools/testing/selftests/kvm/include/aarch64
./tools/testing/selftests/kvm/aarch64

find ./* -name arm64
./arch/arm64    
./Documentation/arm64
./Documentation/translations/zh_CN/arm64
./drivers/acpi/arm64
./include/config/crypto/ghash/arm64
./include/config/crypto/crct10dif/arm64
./include/config/crypto/aes/arm64
./include/config/crypto/sha1/arm64
./include/config/crypto/sha2/arm64
./include/config/crypto/sm3/arm64
./include/config/crypto/sha512/arm64
./include/config/arm64
./include/config/exynos/arm64
./scripts/dtc/include-prefixes/arm64
./tools/testing/selftests/arm64
./tools/arch/arm64
./tools/perf/arch/arm64
./tools/perf/pmu-events/arch/arm64

Upvotes: -3

Related Questions