guix/gnu/packages/patches/rust-1.81-fix-riscv64-bootstrap.patch
Brennan Vincent ff785d32e3
gnu: rust: Update to 1.82.
gnu/packages/rust.scm (rust-1.81)[source]: Add patch to fix bootstrap of
1.82 on riscv64.
gnu/packages/rust.scm (rust-1.82): New variable.
gnu/packages/rust.scm (rust): Update to 1.82.
[source]: Update snippet for newer version.
[arguments]: Disable more tests in the 'disable-tests-requiring-crates.io
phase.

Change-Id: If6ff59011edca7a230946a3ba77b51f26cd47789
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2024-11-28 11:05:03 +02:00

40 lines
1.8 KiB
Diff

From 99e6a28804eac57faa37134d61a2bb17069996a2 Mon Sep 17 00:00:00 2001
From: Nicholas Bishop <nicholasbishop@google.com>
Date: Thu, 30 May 2024 18:32:46 -0400
Subject: [PATCH] Add f16/f128 handling in a couple places
---
compiler/rustc_codegen_llvm/src/abi.rs | 2 ++
compiler/rustc_target/src/abi/call/mod.rs | 2 ++
2 files changed, 4 insertions(+)
diff --git a/compiler/rustc_codegen_llvm/src/abi.rs b/compiler/rustc_codegen_llvm/src/abi.rs
index a6a3f0f964611..2e52d3f426a83 100644
--- a/compiler/rustc_codegen_llvm/src/abi.rs
+++ b/compiler/rustc_codegen_llvm/src/abi.rs
@@ -121,8 +121,10 @@ impl LlvmType for Reg {
match self.kind {
RegKind::Integer => cx.type_ix(self.size.bits()),
RegKind::Float => match self.size.bits() {
+ 16 => cx.type_f16(),
32 => cx.type_f32(),
64 => cx.type_f64(),
+ 128 => cx.type_f128(),
_ => bug!("unsupported float: {:?}", self),
},
RegKind::Vector => cx.type_vector(cx.type_i8(), self.size.bytes()),
diff --git a/compiler/rustc_target/src/abi/call/mod.rs b/compiler/rustc_target/src/abi/call/mod.rs
index fc79c9232d1bd..f83d0492004a2 100644
--- a/compiler/rustc_target/src/abi/call/mod.rs
+++ b/compiler/rustc_target/src/abi/call/mod.rs
@@ -236,8 +236,10 @@ impl Reg {
_ => panic!("unsupported integer: {self:?}"),
},
RegKind::Float => match self.size.bits() {
+ 16 => dl.f16_align.abi,
32 => dl.f32_align.abi,
64 => dl.f64_align.abi,
+ 128 => dl.f128_align.abi,
_ => panic!("unsupported float: {self:?}"),
},
RegKind::Vector => dl.vector_align(self.size).abi,