Skip to content

Commit aefe37d

Browse files
committed
[WIP] Update to Cranelift 0.120
1 parent 84bb8fa commit aefe37d

File tree

5 files changed

+56
-56
lines changed

5 files changed

+56
-56
lines changed

Diff for: Cargo.lock

+36-36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+12-12
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.119.0", default-features = false, features = ["std", "timing", "unwind", "all-native-arch"] }
12-
cranelift-frontend = { version = "0.119.0" }
13-
cranelift-module = { version = "0.119.0" }
14-
cranelift-native = { version = "0.119.0" }
15-
cranelift-jit = { version = "0.119.0", optional = true }
16-
cranelift-object = { version = "0.119.0" }
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" }
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-32.0.0", version = "0.119.0" }
28-
cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-32.0.0", version = "0.119.0" }
29-
cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-32.0.0", version = "0.119.0" }
30-
cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-32.0.0", version = "0.119.0" }
31-
cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-32.0.0", version = "0.119.0" }
32-
cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-32.0.0", version = "0.119.0" }
27+
cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "main", version = "0.120.0" }
28+
cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "main", version = "0.120.0" }
29+
cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "main", version = "0.120.0" }
30+
cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "main", version = "0.120.0" }
31+
cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "main", version = "0.120.0" }
32+
cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "main", version = "0.120.0" }
3333

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

Diff for: src/base.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ fn codegen_stmt<'tcx>(
841841
let done_block = fx.bcx.create_block();
842842
let index = fx.bcx.append_block_param(loop_block, fx.pointer_type);
843843
let zero = fx.bcx.ins().iconst(fx.pointer_type, 0);
844-
fx.bcx.ins().jump(loop_block, &[zero]);
844+
fx.bcx.ins().jump(loop_block, &[zero.into()]);
845845

846846
fx.bcx.switch_to_block(loop_block);
847847
let done = fx.bcx.ins().icmp_imm(IntCC::Equal, index, times as i64);
@@ -851,7 +851,7 @@ fn codegen_stmt<'tcx>(
851851
let to = lval.place_index(fx, index);
852852
to.write_cvalue(fx, operand);
853853
let index = fx.bcx.ins().iadd_imm(index, 1);
854-
fx.bcx.ins().jump(loop_block, &[index]);
854+
fx.bcx.ins().jump(loop_block, &[index.into()]);
855855

856856
fx.bcx.switch_to_block(done_block);
857857
fx.bcx.ins().nop();

Diff for: src/intrinsics/llvm_x86.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ pub(super) fn codegen_x86_llvm_intrinsic_call<'tcx>(
147147
let offset = fx.bcx.ins().imul(index_lane, scale);
148148
let lane_ptr = fx.bcx.ins().iadd(ptr, offset);
149149
let res = fx.bcx.ins().load(lane_clif_ty, MemFlags::trusted(), lane_ptr, 0);
150-
fx.bcx.ins().jump(next, &[res]);
150+
fx.bcx.ins().jump(next, &[res.into()]);
151151

152152
fx.bcx.switch_to_block(if_disabled);
153-
fx.bcx.ins().jump(next, &[src_lane]);
153+
fx.bcx.ins().jump(next, &[src_lane.into()]);
154154

155155
fx.bcx.seal_block(next);
156156
fx.bcx.switch_to_block(next);

Diff for: src/intrinsics/simd.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1008,10 +1008,10 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
10081008

10091009
fx.bcx.switch_to_block(if_enabled);
10101010
let res = fx.bcx.ins().load(lane_clif_ty, MemFlags::trusted(), ptr_lane, 0);
1011-
fx.bcx.ins().jump(next, &[res]);
1011+
fx.bcx.ins().jump(next, &[res.into()]);
10121012

10131013
fx.bcx.switch_to_block(if_disabled);
1014-
fx.bcx.ins().jump(next, &[val_lane]);
1014+
fx.bcx.ins().jump(next, &[val_lane.into()]);
10151015

10161016
fx.bcx.seal_block(next);
10171017
fx.bcx.switch_to_block(next);
@@ -1057,10 +1057,10 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
10571057
ptr_val,
10581058
Offset32::new(offset),
10591059
);
1060-
fx.bcx.ins().jump(next, &[res]);
1060+
fx.bcx.ins().jump(next, &[res.into()]);
10611061

10621062
fx.bcx.switch_to_block(if_disabled);
1063-
fx.bcx.ins().jump(next, &[val_lane]);
1063+
fx.bcx.ins().jump(next, &[val_lane.into()]);
10641064

10651065
fx.bcx.seal_block(next);
10661066
fx.bcx.switch_to_block(next);

0 commit comments

Comments
 (0)