Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppport x32 ABI on Linux #1339

Closed
steveklabnik opened this Issue Oct 27, 2015 · 13 comments

Comments

Projects
None yet
5 participants
@steveklabnik
Copy link
Member

steveklabnik commented Oct 27, 2015

Originally from rust-lang/rust#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.

@sanxiyn

This comment has been minimized.

Copy link
Member

sanxiyn commented Nov 22, 2016

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.

@Amanieu

This comment has been minimized.

Copy link
Contributor

Amanieu commented Nov 22, 2016

@NastyRigger AArch32 is just the normal ARM target.

@Amanieu

This comment has been minimized.

Copy link
Contributor

Amanieu commented Nov 22, 2016

The target does already exist (arm-unknown-linux-gnueabi, arm-unknown-linux-gnueabihf, etc).

@Amanieu

This comment has been minimized.

Copy link
Contributor

Amanieu commented Nov 22, 2016

AArch32 is just another name for the traditional ARM architecture, while AArch64 refers to the new 64-bit instruction set.

@Amanieu

This comment has been minimized.

Copy link
Contributor

Amanieu commented Nov 22, 2016

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.

@sanxiyn

This comment has been minimized.

Copy link
Member

sanxiyn commented Nov 22, 2016

@NastyRigger There doesn't seem to be an existing issue, so I filed #1797.

@petrochenkov

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Nov 23, 2016

@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.

@sanxiyn

This comment has been minimized.

Copy link
Member

sanxiyn commented Nov 24, 2016

Compiling core triggers LLVM bug: rust-lang/rust#37976. I would appreciate debugging help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.