Skip to content

Commit 9fce4e4

Browse files
committed
[WIP] Update to Cranelift 0.120
1 parent 04c7e5a commit 9fce4e4

File tree

5 files changed

+56
-73
lines changed

5 files changed

+56
-73
lines changed

Cargo.lock

Lines changed: 36 additions & 53 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.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 = "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" }
3333

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

src/base.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ fn codegen_stmt<'tcx>(fx: &mut FunctionCx<'_, '_, 'tcx>, cur_block: Block, stmt:
806806
let done_block = fx.bcx.create_block();
807807
let index = fx.bcx.append_block_param(loop_block, fx.pointer_type);
808808
let zero = fx.bcx.ins().iconst(fx.pointer_type, 0);
809-
fx.bcx.ins().jump(loop_block, &[zero]);
809+
fx.bcx.ins().jump(loop_block, &[zero.into()]);
810810

811811
fx.bcx.switch_to_block(loop_block);
812812
let done = fx.bcx.ins().icmp_imm(IntCC::Equal, index, times as i64);
@@ -816,7 +816,7 @@ fn codegen_stmt<'tcx>(fx: &mut FunctionCx<'_, '_, 'tcx>, cur_block: Block, stmt:
816816
let to = lval.place_index(fx, index);
817817
to.write_cvalue(fx, operand);
818818
let index = fx.bcx.ins().iadd_imm(index, 1);
819-
fx.bcx.ins().jump(loop_block, &[index]);
819+
fx.bcx.ins().jump(loop_block, &[index.into()]);
820820

821821
fx.bcx.switch_to_block(done_block);
822822
fx.bcx.ins().nop();

src/intrinsics/llvm_x86.rs

Lines changed: 2 additions & 2 deletions
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);

src/intrinsics/simd.rs

Lines changed: 4 additions & 4 deletions
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)