Skip to content

Commit b37d10e

Browse files
committed
Merge commit '8c848e0604b5d26fad120914f822f564fe05c52a' into sync_cg_clif-2025-06-24
1 parent e388261 commit b37d10e

File tree

9 files changed

+95
-125
lines changed

9 files changed

+95
-125
lines changed

Cargo.lock

Lines changed: 50 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ crate-type = ["dylib"]
88

99
[dependencies]
1010
# These have to be in sync with each other
11-
cranelift-codegen = { version = "0.120.0", default-features = false, features = ["std", "timing", "unwind", "all-native-arch"] }
12-
cranelift-frontend = { version = "0.120.0" }
13-
cranelift-module = { version = "0.120.0" }
14-
cranelift-native = { version = "0.120.0" }
15-
cranelift-jit = { version = "0.120.0", optional = true }
16-
cranelift-object = { version = "0.120.0" }
11+
cranelift-codegen = { version = "0.121.0", default-features = false, features = ["std", "timing", "unwind", "all-native-arch"] }
12+
cranelift-frontend = { version = "0.121.0" }
13+
cranelift-module = { version = "0.121.0" }
14+
cranelift-native = { version = "0.121.0" }
15+
cranelift-jit = { version = "0.121.0", optional = true }
16+
cranelift-object = { version = "0.121.0" }
1717
target-lexicon = "0.13"
1818
gimli = { version = "0.31", default-features = false, features = ["write"] }
1919
object = { version = "0.36", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
@@ -24,12 +24,12 @@ smallvec = "1.8.1"
2424

2525
[patch.crates-io]
2626
# Uncomment to use an unreleased version of cranelift
27-
#cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-33.0.0", version = "0.120.0" }
28-
#cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-33.0.0", version = "0.120.0" }
29-
#cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-33.0.0", version = "0.120.0" }
30-
#cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-33.0.0", version = "0.120.0" }
31-
#cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-33.0.0", version = "0.120.0" }
32-
#cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-33.0.0", version = "0.120.0" }
27+
#cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-34.0.0", version = "0.121.0" }
28+
#cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-34.0.0", version = "0.121.0" }
29+
#cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-34.0.0", version = "0.121.0" }
30+
#cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-34.0.0", version = "0.121.0" }
31+
#cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-34.0.0", version = "0.121.0" }
32+
#cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-34.0.0", version = "0.121.0" }
3333

3434
# Uncomment to use local checkout of cranelift
3535
#cranelift-codegen = { path = "../wasmtime/cranelift/codegen" }

build_system/abi_cafe.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use crate::{CodegenBackend, SysrootKind, build_sysroot};
66
static ABI_CAFE_REPO: GitRepo = GitRepo::github(
77
"Gankra",
88
"abi-cafe",
9-
"f1220cfd13b57f5c0082c26529163865ee25e115",
10-
"fe93a9acd461425d",
9+
"94d38030419eb00a1ba80e5e2b4d763dcee58db4",
10+
"6efb4457893c8670",
1111
"abi-cafe",
1212
);
1313

@@ -46,6 +46,10 @@ pub(crate) fn run(
4646
let mut cmd = ABI_CAFE.run(bootstrap_host_compiler, dirs);
4747
cmd.arg("--");
4848

49+
cmd.arg("--debug");
50+
51+
cmd.arg("--rules").arg(dirs.source_dir.join("scripts/abi-cafe-rules.toml"));
52+
4953
// stdcall, vectorcall and such don't work yet
5054
cmd.arg("--conventions").arg("c").arg("--conventions").arg("rust");
5155

patches/0002-abi-cafe-Disable-broken-tests.patch

Lines changed: 0 additions & 69 deletions
This file was deleted.

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
2-
channel = "nightly-2025-05-25"
2+
channel = "nightly-2025-06-24"
33
components = ["rust-src", "rustc-dev", "llvm-tools"]
44
profile = "minimal"

scripts/abi-cafe-rules.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[target.'cfg(all(target_arch = "aarch64", target_os = "linux"))']
2+
'F32Array::conv_c'.busted = "check"
3+
4+
[target.'cfg(all(target_arch = "aarch64", target_os = "macos"))']
5+
'SingleVariantUnion::conv_c::repr_c'.busted = "check"
6+
'OptionU128::conv_rust::repr_c::rustc_caller'.busted = "run"
7+
'OptionU128::conv_rust::repr_c::cgclif_caller'.busted = "check"
8+
9+
[target.'cfg(all(target_arch = "x86_64", windows))']
10+
'simple::conv_rust'.busted = "check"
11+
'simple::conv_rust::rustc_caller'.busted = "run"
12+
13+
[target.'*'.'f16']
14+
run = "skip"
15+
16+
[target.'*'.'f128']
17+
run = "skip"

src/constant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ fn pointer_for_allocation<'tcx>(
228228
crate::pointer::Pointer::new(global_ptr)
229229
}
230230

231-
pub(crate) fn data_id_for_alloc_id(
231+
fn data_id_for_alloc_id(
232232
cx: &mut ConstantCx,
233233
module: &mut dyn Module,
234234
alloc_id: AllocId,

src/intrinsics/llvm_x86.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,10 @@ pub(super) fn codegen_x86_llvm_intrinsic_call<'tcx>(
202202
};
203203
let x = codegen_operand(fx, &x.node);
204204
let y = codegen_operand(fx, &y.node);
205-
let kind = match &kind.node {
206-
Operand::Constant(const_) => crate::constant::eval_mir_constant(fx, const_).0,
207-
Operand::Copy(_) | Operand::Move(_) => unreachable!("{kind:?}"),
205+
let kind = if let Some(const_) = kind.node.constant() {
206+
crate::constant::eval_mir_constant(fx, const_).0
207+
} else {
208+
unreachable!("{kind:?}")
208209
};
209210

210211
let flt_cc = match kind

0 commit comments

Comments
 (0)