Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic Rustup #3362

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6e207a2
Add stubs for `f16` and `f128` to miri
tgross35 Feb 28, 2024
8186fa7
Auto merge of #118247 - spastorino:type-equality-subtyping, r=lcnr
bors Feb 29, 2024
ed2ee2b
Auto merge of #114016 - krtab:delete_sys_memchr, r=workingjubilee
bors Mar 1, 2024
8a7c301
Auto merge of #121728 - tgross35:f16-f128-step1-ty-updates, r=compile…
bors Mar 1, 2024
89b3c7d
Auto merge of #121462 - compiler-errors:eq-and-sub, r=lcnr
bors Mar 1, 2024
6bae955
Auto merge of #120264 - weihanglo:split-dward-kind-lto, r=michaelwoer…
bors Mar 1, 2024
673ed31
Auto merge of #113026 - jieyouxu:run-make-v2, r=bjorn3
bors Mar 1, 2024
2aadac3
Auto merge of #121657 - estebank:issue-119665, r=davidtwco
bors Mar 2, 2024
2cfc4b1
Auto merge of #121856 - ChrisDenton:abort, r=joboet
bors Mar 3, 2024
ee5aa83
Auto merge of #121936 - RalfJung:miri, r=RalfJung
bors Mar 3, 2024
9167be4
Auto merge of #121763 - clubby789:llvm-old-comment, r=cjgillot
bors Mar 3, 2024
6eaf8c5
Auto merge of #121665 - erikdesjardins:ptradd, r=nikic
bors Mar 3, 2024
1704949
Auto merge of #120585 - Amanieu:ohos-tier2, r=Kobzol
bors Mar 4, 2024
3294745
Auto merge of #121900 - chenyukang:yukang-fix-121425-repr-pack-error,…
bors Mar 4, 2024
c885f06
Auto merge of #120468 - alexcrichton:start-wasm32-wasi-rename, r=wesl…
bors Mar 4, 2024
34f6158
Rename `DiagnosticMessage` as `DiagMessage`.
nnethercote Feb 29, 2024
0506ff5
Auto merge of #121780 - nnethercote:diag-renaming2, r=davidtwco
bors Mar 5, 2024
a8cb44d
Auto merge of #121001 - nyurik:optimize-core-fmt, r=cuviper
bors Mar 5, 2024
7061092
Auto merge of #121138 - Swatinem:grapheme-extend-ascii, r=cuviper
bors Mar 5, 2024
7d212cc
Auto merge of #121992 - jieyouxu:fix-tidy-unpaired-revision, r=onur-o…
bors Mar 5, 2024
0860639
Auto merge of #121428 - okaneco:ipaddr_parse, r=cuviper
bors Mar 5, 2024
3b00eb4
Preparing for merge from rustc
Mar 6, 2024
0bae300
Merge from rustc
Mar 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1a1876c9790f168fb51afa335a7ba3e6fc267d75
b77e0184a95d60080f0d0605e2a3b337e904c21e
4 changes: 2 additions & 2 deletions src/diagnostics.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::fmt::{self, Write};
use std::num::NonZero;

use rustc_errors::{Diag, DiagnosticMessage, Level};
use rustc_errors::{Diag, DiagMessage, Level};
use rustc_span::{SpanData, Symbol, DUMMY_SP};
use rustc_target::abi::{Align, Size};

Expand Down Expand Up @@ -95,7 +95,7 @@ impl fmt::Debug for TerminationInfo {
}

impl MachineStopType for TerminationInfo {
fn diagnostic_message(&self) -> DiagnosticMessage {
fn diagnostic_message(&self) -> DiagMessage {
self.to_string().into()
}
fn add_args(
Expand Down
10 changes: 10 additions & 0 deletions src/shims/intrinsics/simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
let op = op.to_scalar();
// "Bitwise" operation, no NaN adjustments
match float_ty {
FloatTy::F16 => unimplemented!("f16_f128"),
FloatTy::F32 => Scalar::from_f32(op.to_f32()?.abs()),
FloatTy::F64 => Scalar::from_f64(op.to_f64()?.abs()),
FloatTy::F128 => unimplemented!("f16_f128"),
}
}
Op::Sqrt => {
Expand All @@ -93,6 +95,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
};
// FIXME using host floats
match float_ty {
FloatTy::F16 => unimplemented!("f16_f128"),
FloatTy::F32 => {
let f = op.to_scalar().to_f32()?;
let res = f.to_host().sqrt().to_soft();
Expand All @@ -105,13 +108,15 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
let res = this.adjust_nan(res, &[f]);
Scalar::from(res)
}
FloatTy::F128 => unimplemented!("f16_f128"),
}
}
Op::Round(rounding) => {
let ty::Float(float_ty) = op.layout.ty.kind() else {
span_bug!(this.cur_span(), "{} operand is not a float", intrinsic_name)
};
match float_ty {
FloatTy::F16 => unimplemented!("f16_f128"),
FloatTy::F32 => {
let f = op.to_scalar().to_f32()?;
let res = f.round_to_integral(rounding).value;
Expand All @@ -124,6 +129,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
let res = this.adjust_nan(res, &[f]);
Scalar::from_f64(res)
}
FloatTy::F128 => unimplemented!("f16_f128"),
}
}
Op::Numeric(name) => {
Expand Down Expand Up @@ -267,6 +273,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
span_bug!(this.cur_span(), "{} operand is not a float", intrinsic_name)
};
let val = match float_ty {
FloatTy::F16 => unimplemented!("f16_f128"),
FloatTy::F32 => {
let a = a.to_f32()?;
let b = b.to_f32()?;
Expand All @@ -283,6 +290,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
let res = this.adjust_nan(res, &[a, b, c]);
Scalar::from(res)
}
FloatTy::F128 => unimplemented!("f16_f128"),
};
this.write_scalar(val, &dest)?;
}
Expand Down Expand Up @@ -724,6 +732,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
let left = left.to_scalar();
let right = right.to_scalar();
Ok(match float_ty {
FloatTy::F16 => unimplemented!("f16_f128"),
FloatTy::F32 => {
let left = left.to_f32()?;
let right = right.to_f32()?;
Expand All @@ -744,6 +753,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
let res = this.adjust_nan(res, &[left, right]);
Scalar::from_f64(res)
}
FloatTy::F128 => unimplemented!("f16_f128"),
})
}
}
Expand Down