-
Notifications
You must be signed in to change notification settings - Fork 107
Test rustc bootstrapping on AArch64 #1184
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
Comments
Hey, I mentioned I had an issue natively running The issue shows up when compiling the
Here's the offending line. This is a bit weird because running
Even if i set
Am I missing anything? |
Isn't this the offending line: https://github.com/BurntSushi/byteorder/blob/eaaad370715c04d78334d6a5b49c637549c84c71/build.rs#L54 (line 54, not 45) Doesn't look like a |
I just finished compiling cg_clif for aarch64 using qemu. The panic happens in |
Oh, right, I think I got mixed up, because the issue I was having in It is indeed in line 54. Here's the backtrace:
|
Never mind. That only happens when you explicitly pass |
The error seems to happen at https://github.com/rust-lang/rust/blob/851c82e88ade86bfe3b4ee785d5e5ab1d954b61c/library/core/src/str/mod.rs#L112 suggesting a non-utf8 string. |
With a debug sysroot:
and then it hangs. Couldn't even see this until I killed qemu. |
Hmm, I modified the
|
Here's a minimal repro case:
This is enough to crash:
Edit:
Edit 2: Narrowing it down, it seems that we are miss compiling a comparison after a dereference. I'm going to try to get a clif test file out of this.
Edit 3:
This passes on x64 and fails on aarch64. I'll keep working on this tommorow. |
Thanks for the debugging! |
When encoding constants as immediates into an RSE Imm12 instruction we need to take special care to check if the value that we are trying to input does not overflow its type when viewed as a signed value. (i.e. iconst.i8 200) We cannot both put an immediate and sign extend it, so we need to lower it into a separate reg, and emit the sign extend into the instruction. For more details see the [cg_clif bug report](https://github.com/bjorn3/rustc_codegen_cranelift/issues/1184#issuecomment-873214796).
When encoding constants as immediates into an RSE Imm12 instruction we need to take special care to check if the value that we are trying to input does not overflow its type when viewed as a signed value. (i.e. iconst.i8 200) We cannot both put an immediate and sign extend it, so we need to lower it into a separate reg, and emit the sign extend into the instruction. For more details see the [cg_clif bug report](https://github.com/bjorn3/rustc_codegen_cranelift/issues/1184#issuecomment-873214796).
When encoding constants as immediates into an RSE Imm12 instruction we need to take special care to check if the value that we are trying to input does not overflow its type when viewed as a signed value. (i.e. iconst.i8 200) We cannot both put an immediate and sign extend it, so we need to lower it into a separate reg, and emit the sign extend into the instruction. For more details see the [cg_clif bug report](https://github.com/bjorn3/rustc_codegen_cranelift/issues/1184#issuecomment-873214796).
When encoding constants as immediates into an RSE Imm12 instruction we need to take special care to check if the value that we are trying to input does not overflow its type when viewed as a signed value. (i.e. iconst.i8 200) We cannot both put an immediate and sign extend it, so we need to lower it into a separate reg, and emit the sign extend into the instruction. For more details see the [cg_clif bug report](https://github.com/bjorn3/rustc_codegen_cranelift/issues/1184#issuecomment-873214796).
This has a fix for a miscompilation on AArch64 cc #1184
Now getting
|
This seems to be an abi incompatibility with cg_llvm: Backtrace
|
At the moment of the crash the register state is:
For a |
…jorn3 Sync rustc_codegen_cranelift The main hightlight this sync is basic support for AArch64. Most things should work on Linux, but there does seem to be an ABI incompatibility causing proc-macros to crash, see https://github.com/bjorn3/rustc_codegen_cranelift/issues/1184. Thanks to `@afonso360` for implementing all Cranelift features that were necessary to compile for AArch64 using cg_clif. Also thanks to `@shamatar` for implementing the `llvm.x86.addcarry.64` and `llvm.x86.subborrow.64` llvm intrinsics used by num-bigint (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1178) and `@eggyal` for implementing multi-threading support for the lazy jit mode. (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1166) r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
…jorn3 Sync rustc_codegen_cranelift The main hightlight this sync is basic support for AArch64. Most things should work on Linux, but there does seem to be an ABI incompatibility causing proc-macros to crash, see https://github.com/bjorn3/rustc_codegen_cranelift/issues/1184. Thanks to ``@afonso360`` for implementing all Cranelift features that were necessary to compile for AArch64 using cg_clif. Also thanks to ``@shamatar`` for implementing the `llvm.x86.addcarry.64` and `llvm.x86.subborrow.64` llvm intrinsics used by num-bigint (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1178) and ``@eggyal`` for implementing multi-threading support for the lazy jit mode. (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1166) r? ``@ghost`` ``@rustbot`` label +A-codegen +A-cranelift +T-compiler
…jorn3 Sync rustc_codegen_cranelift The main hightlight this sync is basic support for AArch64. Most things should work on Linux, but there does seem to be an ABI incompatibility causing proc-macros to crash, see https://github.com/bjorn3/rustc_codegen_cranelift/issues/1184. Thanks to ```@afonso360``` for implementing all Cranelift features that were necessary to compile for AArch64 using cg_clif. Also thanks to ```@shamatar``` for implementing the `llvm.x86.addcarry.64` and `llvm.x86.subborrow.64` llvm intrinsics used by num-bigint (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1178) and ```@eggyal``` for implementing multi-threading support for the lazy jit mode. (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1166) r? ```@ghost``` ```@rustbot``` label +A-codegen +A-cranelift +T-compiler
No description provided.
The text was updated successfully, but these errors were encountered: