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

LLVM UNREACHABLE when compiling core for x32 ABI #37976

Closed
sanxiyn opened this issue Nov 24, 2016 · 2 comments
Closed

LLVM UNREACHABLE when compiling core for x32 ABI #37976

sanxiyn opened this issue Nov 24, 2016 · 2 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug.

Comments

@sanxiyn
Copy link
Member

sanxiyn commented Nov 24, 2016

$ cat x86_64-unknown-linux-gnux32.json
{
    "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",
    "linker-flavor": "gcc",
    "target-endian": "little",
    "target-pointer-width": "32"
}
$ rustc --target x86_64-unknown-linux-gnux32 $(rustc --print sysroot)/lib/rustlib/src/rust/src/libcore/lib.rs
Cannot emit physreg copy instruction
UNREACHABLE executed at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/lib/Target/X86/X86InstrInfo.cpp:4708!
$ rustc --version
rustc 1.15.0-nightly (3bf2be9ce 2016-11-22)
@sanxiyn sanxiyn added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Nov 24, 2016
@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 26, 2017
@malbarbo
Copy link
Contributor

I was able to build x86_64-unknown-linux-gnux32 in my machine. I've submitted a PR to add it to rustc.

I had to disable elf tls, maybe this is the reason you got an error.

@sanxiyn
Copy link
Member Author

sanxiyn commented Oct 19, 2017

This seems somehow fixed, although I am not sure when.

@sanxiyn sanxiyn closed this as completed Oct 19, 2017
bors added a commit to rust-lang/libc that referenced this issue Oct 19, 2017
Initial fixes for linux x32

Tested with a local build of rustc. The main test can be compiled but fails to execute (receives SIGTRAP, which I think in this case indicates memory violation, I will open an issue in the rustc repo).

This PR is important because it fixes the definition of `c_long` and `c_ulong`. Without these fixes, rustc crash with the error:

```
Cannot emit physreg copy instruction
UNREACHABLE executed at /checkout/src/llvm/lib/Target/X86/X86InstrInfo.cpp:5778!
```

Related rust-lang/rust#37976
bors added a commit to rust-lang/libc that referenced this issue Oct 19, 2017
Initial fixes for linux x32

Tested with a local build of rustc. The main test can be compiled but fails to execute (receives SIGTRAP, which I think in this case indicates memory violation, I will open an issue in the rustc repo).

This PR is important because it fixes the definition of `c_long` and `c_ulong`. Without these fixes, rustc crash with the error:

```
Cannot emit physreg copy instruction
UNREACHABLE executed at /checkout/src/llvm/lib/Target/X86/X86InstrInfo.cpp:5778!
```

Related rust-lang/rust#37976
bors added a commit to rust-lang/libc that referenced this issue Oct 19, 2017
Initial fixes for linux x32

Tested with a local build of rustc. The main test can be compiled but fails to execute (receives SIGTRAP, which I think in this case indicates memory violation, I will open an issue in the rustc repo).

This PR is important because it fixes the definition of `c_long` and `c_ulong`. Without these fixes, rustc crash with the error:

```
Cannot emit physreg copy instruction
UNREACHABLE executed at /checkout/src/llvm/lib/Target/X86/X86InstrInfo.cpp:5778!
```

Related rust-lang/rust#37976
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants