Add switch to turn on/off NaN canonicalization.

This commit is contained in:
losfair
2020-03-16 23:40:02 +08:00
parent 8ea7bfd563
commit 5d26d92d9b
3 changed files with 340 additions and 184 deletions

View File

@ -132,6 +132,10 @@ pub struct CompilerConfig {
/// When enabled there can be a small amount of runtime performance overhead.
pub full_preemption: bool,
/// Whether to enable spec-compliant NaN canonicalization at all places.
/// Enabling this increases runtime overhead.
pub nan_canonicalization: bool,
pub features: Features,
// Target info. Presently only supported by LLVM.

File diff suppressed because it is too large Load Diff

View File

@ -336,6 +336,7 @@ mod tests {
simd: true,
threads: true,
},
nan_canonicalization: true,
..Default::default()
};
let module = compile_with_config(&module.into_vec(), config)
@ -774,6 +775,7 @@ mod tests {
simd: true,
threads: true,
},
nan_canonicalization: true,
..Default::default()
};
compile_with_config(&module.into_vec(), config)
@ -826,6 +828,7 @@ mod tests {
simd: true,
threads: true,
},
nan_canonicalization: true,
..Default::default()
};
compile_with_config(&module.into_vec(), config)
@ -877,6 +880,7 @@ mod tests {
simd: true,
threads: true,
},
nan_canonicalization: true,
..Default::default()
};
let module = compile_with_config(&module.into_vec(), config)
@ -972,6 +976,7 @@ mod tests {
simd: true,
threads: true,
},
nan_canonicalization: true,
..Default::default()
};
let module = compile_with_config(&module.into_vec(), config)