diff options
| author | Afonso Bordado <afonso360@users.noreply.github.com> | 2022-07-28 20:08:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-28 21:08:05 +0200 |
| commit | 49e773183e504f4f73cfcb7dfd5a397b8c94be1e (patch) | |
| tree | 9b95eb230658ed1bc406b8f7026d58c4a922b992 /src | |
| parent | e34bb03197af68ef03a52ba0acbb9a44c958c253 (diff) | |
| download | rust-49e773183e504f4f73cfcb7dfd5a397b8c94be1e.tar.gz rust-49e773183e504f4f73cfcb7dfd5a397b8c94be1e.zip | |
Update to cranelift 0.86 (#1250)
Diffstat (limited to 'src')
| -rw-r--r-- | src/abi/pass_mode.rs | 2 | ||||
| -rw-r--r-- | src/common.rs | 2 | ||||
| -rw-r--r-- | src/intrinsics/mod.rs | 2 | ||||
| -rw-r--r-- | src/value_and_place.rs | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/abi/pass_mode.rs b/src/abi/pass_mode.rs index 6c10baa53d4..2f8c697bd1e 100644 --- a/src/abi/pass_mode.rs +++ b/src/abi/pass_mode.rs @@ -23,7 +23,7 @@ fn reg_to_abi_param(reg: Reg) -> AbiParam { (RegKind::Integer, 9..=16) => types::I128, (RegKind::Float, 4) => types::F32, (RegKind::Float, 8) => types::F64, - (RegKind::Vector, size) => types::I8.by(u16::try_from(size).unwrap()).unwrap(), + (RegKind::Vector, size) => types::I8.by(u32::try_from(size).unwrap()).unwrap(), _ => unreachable!("{:?}", reg), }; AbiParam::new(clif_ty) diff --git a/src/common.rs b/src/common.rs index f9dc1b5169e..fc4953cea6f 100644 --- a/src/common.rs +++ b/src/common.rs @@ -74,7 +74,7 @@ fn clif_type_from_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option<types::Typ _ => unreachable!(), }; - match scalar_to_clif_type(tcx, element).by(u16::try_from(count).unwrap()) { + match scalar_to_clif_type(tcx, element).by(u32::try_from(count).unwrap()) { // Cranelift currently only implements icmp for 128bit vectors. Some(vector_ty) if vector_ty.bits() == 128 => vector_ty, _ => return None, diff --git a/src/intrinsics/mod.rs b/src/intrinsics/mod.rs index b2a83e1d4eb..f552c13958d 100644 --- a/src/intrinsics/mod.rs +++ b/src/intrinsics/mod.rs @@ -53,7 +53,7 @@ pub(crate) fn clif_vector_type<'tcx>(tcx: TyCtxt<'tcx>, layout: TyAndLayout<'tcx _ => unreachable!(), }; - match scalar_to_clif_type(tcx, element).by(u16::try_from(count).unwrap()) { + match scalar_to_clif_type(tcx, element).by(u32::try_from(count).unwrap()) { // Cranelift currently only implements icmp for 128bit vectors. Some(vector_ty) if vector_ty.bits() == 128 => Some(vector_ty), _ => None, diff --git a/src/value_and_place.rs b/src/value_and_place.rs index 45ae2bd8f07..e48d095d139 100644 --- a/src/value_and_place.rs +++ b/src/value_and_place.rs @@ -122,7 +122,7 @@ impl<'tcx> CValue<'tcx> { let clif_ty = match layout.abi { Abi::Scalar(scalar) => scalar_to_clif_type(fx.tcx, scalar), Abi::Vector { element, count } => scalar_to_clif_type(fx.tcx, element) - .by(u16::try_from(count).unwrap()) + .by(u32::try_from(count).unwrap()) .unwrap(), _ => unreachable!("{:?}", layout.ty), }; @@ -519,7 +519,7 @@ impl<'tcx> CPlace<'tcx> { if let ty::Array(element, len) = dst_layout.ty.kind() { // Can only happen for vector types let len = - u16::try_from(len.eval_usize(fx.tcx, ParamEnv::reveal_all())).unwrap(); + u32::try_from(len.eval_usize(fx.tcx, ParamEnv::reveal_all())).unwrap(); let vector_ty = fx.clif_type(*element).unwrap().by(len).unwrap(); let data = match from.0 { |
