Originally from https://github.com/rust-lang/rust/issues/17493 by @kmcallister
The x32 ABI provides the various benefits of native AMD64 mode while cutting memory use for pointers in half, for programs that don't need more than 4 GB of address space.
I am working on this. Here is a JSON file that can be used with Rust's flexible target specification.
{
"arch": "x86_64",
"data-layout": "e-m:e-p:32:32-i64:64-f80:128-n8:16:32:64-S128",
"llvm-target": "x86_64-unknown-linux-gnux32",
"os": "linux",
"target-endian": "little",
"target-pointer-width": "32"
}
Compared to x86_64-unknown-linux-gnu, x32 uses gnux32 in the triple. target-pointer-width is changed to 32 from 64, which is the entire point. data-layout is also changed to include "p:32:32", which means the pointer is 32 bits and aligned to 32 bits.
@NastyRigger AArch32 is just the normal ARM target.
The target does already exist (arm-unknown-linux-gnueabi, arm-unknown-linux-gnueabihf, etc).
AArch32 is just another name for the traditional ARM architecture, while AArch64 refers to the new 64-bit instruction set.
Are you talking about the AArch64 ILP32 ABI, which is the ARM equivalent of x32? This ABI is still in development, and there is no official toolchain support for it since the required kernel changes have not been accepted yet.
@NastyRigger There doesn't seem to be an existing issue, so I filed #1797.
@Amanieu
AArch32 is just another name for the traditional ARM architecture
Hey, it's not just a compatibility layer.
ARMv8-A AArch32 contains a bunch of additions compared to ARMv7-A aligning it with ARMv8-A AArch64 - SIMD, floating point, cryptography, syncronization. A lot of system registers are added as well, including the whole sysreg-based interrupt controller interface. It also deprecates and even removes some older AArch64-incompatible stuff.
Compiling core triggers LLVM bug: rust-lang/rust#37976. I would appreciate debugging help.
Most helpful comment
Are you talking about the AArch64 ILP32 ABI, which is the ARM equivalent of x32? This ABI is still in development, and there is no official toolchain support for it since the required kernel changes have not been accepted yet.