rustup; no need to special-case the guaranteed_eq/ne intrinsics any more
This commit is contained in:
parent
09e6ccc580
commit
3163242ff1
@ -1 +1 @@
|
||||
a1894e4afe1a39f718cc27232a5a2f0d02b501f6
|
||||
7bdb5dee7bac15458b10b148e9e24968e633053e
|
||||
|
@ -8,7 +8,6 @@ use rustc_middle::{mir, ty};
|
||||
use rustc_middle::ty::layout::IntegerExt;
|
||||
use rustc_apfloat::{Float, Round};
|
||||
use rustc_target::abi::{Align, Integer, LayoutOf};
|
||||
use rustc_span::symbol::sym;
|
||||
|
||||
use crate::*;
|
||||
use helpers::check_arg_count;
|
||||
@ -23,19 +22,13 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
|
||||
_unwind: Option<mir::BasicBlock>,
|
||||
) -> InterpResult<'tcx> {
|
||||
let this = self.eval_context_mut();
|
||||
let intrinsic_name = this.tcx.item_name(instance.def_id());
|
||||
// We want to overwrite some of the intrinsic implementations that CTFE uses.
|
||||
let prefer_miri_intrinsic = match intrinsic_name {
|
||||
sym::ptr_guaranteed_eq | sym::ptr_guaranteed_ne => true,
|
||||
_ => false,
|
||||
};
|
||||
|
||||
if !prefer_miri_intrinsic && this.emulate_intrinsic(instance, args, ret)? {
|
||||
if this.emulate_intrinsic(instance, args, ret)? {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
// All supported intrinsics have a return place.
|
||||
let intrinsic_name = &*intrinsic_name.as_str();
|
||||
let intrinsic_name = &*this.tcx.item_name(instance.def_id()).as_str();
|
||||
let (dest, ret) = match ret {
|
||||
None => throw_unsup_format!("unimplemented (diverging) intrinsic: {}", intrinsic_name),
|
||||
Some(p) => p,
|
||||
|
Loading…
x
Reference in New Issue
Block a user