Various MIRI fixes
This commit is contained in:
parent
727b15aa93
commit
4c87db906a
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -180,9 +180,9 @@ checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4"
|
|||
|
||||
[[package]]
|
||||
name = "anymap"
|
||||
version = "0.12.1"
|
||||
version = "1.0.0-beta.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "33954243bd79057c2de7338850b85983a44588021f8a5fee574a8888c6de4344"
|
||||
checksum = "8f1f8f5a6f3d50d89e3797d7593a50f96bb2aaa20ca0cc7be1fb673232c91d72"
|
||||
|
||||
[[package]]
|
||||
name = "approx"
|
||||
|
|
|
@ -75,7 +75,7 @@ docs = []
|
|||
nih_plug_derive = { path = "nih_plug_derive" }
|
||||
|
||||
anyhow = "1.0"
|
||||
anymap = "0.12.1"
|
||||
anymap = "1.0.0-beta.2"
|
||||
atomic_float = "0.1"
|
||||
atomic_refcell = "0.1"
|
||||
backtrace = "0.3.65"
|
||||
|
|
|
@ -77,7 +77,7 @@ where
|
|||
// workaround to have a singleton that also works if for whatever reason there arem ultiple `T`
|
||||
// and `E`s in a single process (won't happen with normal plugin usage, but sho knwos).
|
||||
lazy_static::lazy_static! {
|
||||
static ref HANDLE_MAP: Mutex<anymap::Map<dyn anymap::any::Any + Send + 'static>> =
|
||||
static ref HANDLE_MAP: Mutex<anymap::Map<dyn std::any::Any + Send + 'static>> =
|
||||
Mutex::new(anymap::Map::new());
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ macro_rules! nih_export_clap {
|
|||
&& unsafe { ::std::ffi::CStr::from_ptr(factory_id) }
|
||||
== ::nih_plug::wrapper::clap::CLAP_PLUGIN_FACTORY_ID
|
||||
{
|
||||
&(*FACTORY).clap_plugin_factory as *const _ as *const ::std::ffi::c_void
|
||||
&*FACTORY as *const _ as *const ::std::ffi::c_void
|
||||
} else {
|
||||
std::ptr::null()
|
||||
}
|
||||
|
|
|
@ -204,7 +204,7 @@ struct ScopedFtz {
|
|||
impl ScopedFtz {
|
||||
fn enable() -> Self {
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(target_feature = "sse")] {
|
||||
if #[cfg(all(target_feature = "sse", not(miri)))] {
|
||||
let mode = unsafe { std::arch::x86_64::_MM_GET_FLUSH_ZERO_MODE() };
|
||||
let should_disable_again = mode != std::arch::x86_64::_MM_FLUSH_ZERO_ON;
|
||||
if should_disable_again {
|
||||
|
@ -215,7 +215,7 @@ impl ScopedFtz {
|
|||
should_disable_again,
|
||||
_send_sync_marker: PhantomData,
|
||||
}
|
||||
} else if #[cfg(target_arch = "aarch64")] {
|
||||
} else if #[cfg(all(target_arch = "aarch64", not(miri)))] {
|
||||
// There are no convient intrinsics to change the FTZ settings on AArch64, so this
|
||||
// requires inline assembly:
|
||||
// https://developer.arm.com/documentation/ddi0595/2021-06/AArch64-Registers/FPCR--Floating-point-Control-Register
|
||||
|
@ -243,6 +243,7 @@ impl ScopedFtz {
|
|||
|
||||
impl Drop for ScopedFtz {
|
||||
fn drop(&mut self) {
|
||||
#[cfg(not(miri))]
|
||||
if self.should_disable_again {
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(target_feature = "sse")] {
|
||||
|
|
Loading…
Reference in a new issue