Skip to content

Commit b14c733

Browse files
committed
Update to Cranelift 0.87.0
1 parent 7dc8f38 commit b14c733

File tree

7 files changed

+41
-47
lines changed

7 files changed

+41
-47
lines changed

Cargo.lock

Lines changed: 28 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: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ crate-type = ["dylib"]
88

99
[dependencies]
1010
# These have to be in sync with each other
11-
cranelift-codegen = { version = "0.86.1", features = ["unwind", "all-arch"] }
12-
cranelift-frontend = "0.86.1"
13-
cranelift-module = "0.86.1"
14-
cranelift-native = "0.86.1"
15-
cranelift-jit = { version = "0.86.1", optional = true }
16-
cranelift-object = "0.86.1"
11+
cranelift-codegen = { version = "0.87.0", features = ["unwind", "all-arch"] }
12+
cranelift-frontend = "0.87.0"
13+
cranelift-module = "0.87.0"
14+
cranelift-native = "0.87.0"
15+
cranelift-jit = { version = "0.87.0", optional = true }
16+
cranelift-object = "0.87.0"
1717
target-lexicon = "0.12.0"
1818
gimli = { version = "0.26.0", default-features = false, features = ["write"]}
19-
object = { version = "0.28.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
19+
object = { version = "0.29.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
2020

2121
ar = { git = "https://github.com/bjorn3/rust-ar.git", branch = "do_not_remove_cg_clif_ranlib" }
2222
indexmap = "1.9.1"

src/abi/pass_mode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ pub(super) fn from_casted_value<'tcx>(
184184
let abi_params = cast_target_to_abi_params(cast);
185185
let abi_param_size: u32 = abi_params.iter().map(|param| param.value_type.bytes()).sum();
186186
let layout_size = u32::try_from(layout.size.bytes()).unwrap();
187-
let stack_slot = fx.bcx.create_stack_slot(StackSlotData {
187+
let stack_slot = fx.bcx.create_sized_stack_slot(StackSlotData {
188188
kind: StackSlotKind::ExplicitSlot,
189189
// FIXME Don't force the size to a multiple of 16 bytes once Cranelift gets a way to
190190
// specify stack slot alignment.

src/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ fn compile_fn<'tcx>(
202202
&clif_comments,
203203
);
204204

205-
if let Some(disasm) = &context.mach_compile_result.as_ref().unwrap().disasm {
205+
if let Some(disasm) = &context.compiled_code().unwrap().disasm {
206206
crate::pretty_clif::write_ir_file(
207207
&cx.output_filenames,
208208
&format!("{}.vcode", codegened_func.symbol_name.name),

src/debuginfo/line_info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl FunctionDebugContext {
161161

162162
let mut func_end = 0;
163163

164-
let mcr = context.mach_compile_result.as_ref().unwrap();
164+
let mcr = context.compiled_code().unwrap();
165165
for &MachSrcLoc { start, end, loc } in mcr.buffer.get_srclocs_sorted() {
166166
debug_context.dwarf.unit.line_program.row().address_offset = u64::from(start);
167167
if !loc.is_default() {

src/inline_asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ fn call_inline_asm<'tcx>(
733733
inputs: Vec<(Size, Value)>,
734734
outputs: Vec<(Size, CPlace<'tcx>)>,
735735
) {
736-
let stack_slot = fx.bcx.func.create_stack_slot(StackSlotData {
736+
let stack_slot = fx.bcx.func.create_sized_stack_slot(StackSlotData {
737737
kind: StackSlotKind::ExplicitSlot,
738738
size: u32::try_from(slot_size.bytes()).unwrap(),
739739
});

src/value_and_place.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ impl<'tcx> CPlace<'tcx> {
330330
.fatal(&format!("values of type {} are too big to store on the stack", layout.ty));
331331
}
332332

333-
let stack_slot = fx.bcx.create_stack_slot(StackSlotData {
333+
let stack_slot = fx.bcx.create_sized_stack_slot(StackSlotData {
334334
kind: StackSlotKind::ExplicitSlot,
335335
// FIXME Don't force the size to a multiple of 16 bytes once Cranelift gets a way to
336336
// specify stack slot alignment.
@@ -472,7 +472,7 @@ impl<'tcx> CPlace<'tcx> {
472472
}
473473
_ if src_ty.is_vector() || dst_ty.is_vector() => {
474474
// FIXME do something more efficient for transmutes between vectors and integers.
475-
let stack_slot = fx.bcx.create_stack_slot(StackSlotData {
475+
let stack_slot = fx.bcx.create_sized_stack_slot(StackSlotData {
476476
kind: StackSlotKind::ExplicitSlot,
477477
// FIXME Don't force the size to a multiple of 16 bytes once Cranelift gets a way to
478478
// specify stack slot alignment.

0 commit comments

Comments
 (0)