mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-04 21:55:06 +01:00
backend_x64: Fix FPVectorMulAdd and FPMulAdd NaN handling with denormals
Denormals should be treated as zero in NaN handler
This commit is contained in:
parent
381821eda3
commit
822fd4a875
4 changed files with 36 additions and 11 deletions
|
|
@ -9,13 +9,17 @@
|
|||
#include <boost/optional.hpp>
|
||||
|
||||
#include "common/common_types.h"
|
||||
#include "common/fp/fpcr.h"
|
||||
#include "common/fp/info.h"
|
||||
|
||||
namespace Dynarmic::FP {
|
||||
|
||||
/// Is floating point value a zero?
|
||||
template<typename FPT>
|
||||
constexpr bool IsZero(FPT value) {
|
||||
inline bool IsZero(FPT value, FPCR fpcr) {
|
||||
if (fpcr.FZ()) {
|
||||
return (value & FPInfo<FPT>::exponent_mask) == 0;
|
||||
}
|
||||
return (value & ~FPInfo<FPT>::sign_mask) == 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue