Skip to content

Commit 49e7731

Browse files
authored
Update to cranelift 0.86 (rust-lang#1250)
1 parent e34bb03 commit 49e7731

File tree

6 files changed

+97
-54
lines changed

6 files changed

+97
-54
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 6 additions & 6 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.85.3", features = ["unwind", "all-arch"] }
12-
cranelift-frontend = "0.85.3"
13-
cranelift-module = "0.85.3"
14-
cranelift-native = "0.85.3"
15-
cranelift-jit = { version = "0.85.3", optional = true }
16-
cranelift-object = "0.85.3"
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"
1717
target-lexicon = "0.12.0"
1818
gimli = { version = "0.26.0", default-features = false, features = ["write"]}
1919
object = { version = "0.28.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }

src/abi/pass_mode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn reg_to_abi_param(reg: Reg) -> AbiParam {
2323
(RegKind::Integer, 9..=16) => types::I128,
2424
(RegKind::Float, 4) => types::F32,
2525
(RegKind::Float, 8) => types::F64,
26-
(RegKind::Vector, size) => types::I8.by(u16::try_from(size).unwrap()).unwrap(),
26+
(RegKind::Vector, size) => types::I8.by(u32::try_from(size).unwrap()).unwrap(),
2727
_ => unreachable!("{:?}", reg),
2828
};
2929
AbiParam::new(clif_ty)

src/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ fn clif_type_from_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option<types::Typ
7474
_ => unreachable!(),
7575
};
7676

77-
match scalar_to_clif_type(tcx, element).by(u16::try_from(count).unwrap()) {
77+
match scalar_to_clif_type(tcx, element).by(u32::try_from(count).unwrap()) {
7878
// Cranelift currently only implements icmp for 128bit vectors.
7979
Some(vector_ty) if vector_ty.bits() == 128 => vector_ty,
8080
_ => return None,

src/intrinsics/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub(crate) fn clif_vector_type<'tcx>(tcx: TyCtxt<'tcx>, layout: TyAndLayout<'tcx
5353
_ => unreachable!(),
5454
};
5555

56-
match scalar_to_clif_type(tcx, element).by(u16::try_from(count).unwrap()) {
56+
match scalar_to_clif_type(tcx, element).by(u32::try_from(count).unwrap()) {
5757
// Cranelift currently only implements icmp for 128bit vectors.
5858
Some(vector_ty) if vector_ty.bits() == 128 => Some(vector_ty),
5959
_ => None,

src/value_and_place.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl<'tcx> CValue<'tcx> {
122122
let clif_ty = match layout.abi {
123123
Abi::Scalar(scalar) => scalar_to_clif_type(fx.tcx, scalar),
124124
Abi::Vector { element, count } => scalar_to_clif_type(fx.tcx, element)
125-
.by(u16::try_from(count).unwrap())
125+
.by(u32::try_from(count).unwrap())
126126
.unwrap(),
127127
_ => unreachable!("{:?}", layout.ty),
128128
};
@@ -519,7 +519,7 @@ impl<'tcx> CPlace<'tcx> {
519519
if let ty::Array(element, len) = dst_layout.ty.kind() {
520520
// Can only happen for vector types
521521
let len =
522-
u16::try_from(len.eval_usize(fx.tcx, ParamEnv::reveal_all())).unwrap();
522+
u32::try_from(len.eval_usize(fx.tcx, ParamEnv::reveal_all())).unwrap();
523523
let vector_ty = fx.clif_type(*element).unwrap().by(len).unwrap();
524524

525525
let data = match from.0 {

0 commit comments

Comments
 (0)