diff options
| author | MerryMage <MerryMage@users.noreply.github.com> | 2017-04-11 17:01:29 +0100 |
|---|---|---|
| committer | MerryMage <MerryMage@users.noreply.github.com> | 2017-04-11 20:25:18 +0100 |
| commit | f7ed979e30068814eea8e4eb808ceccb80f37576 (patch) | |
| tree | e590bbccb6af0081ca649c31016e00ebef68f2ea /Source/Core/Common/MathUtil.h | |
| parent | 433999d60ff2af2aa74fe7cd3b4f5ca699637c36 (diff) | |
Jit64AsmCommon: Make frsqrte and fres PIE-compliant
Diffstat (limited to 'Source/Core/Common/MathUtil.h')
| -rw-r--r-- | Source/Core/Common/MathUtil.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/Core/Common/MathUtil.h b/Source/Core/Common/MathUtil.h index e91358c5c1..7e48e38d80 100644 --- a/Source/Core/Common/MathUtil.h +++ b/Source/Core/Common/MathUtil.h @@ -5,6 +5,7 @@ #pragma once #include <algorithm> +#include <array> #include <cstdlib> #include <vector> @@ -131,10 +132,13 @@ u32 ClassifyDouble(double dvalue); // More efficient float version. u32 ClassifyFloat(float fvalue); -extern const int frsqrte_expected_base[]; -extern const int frsqrte_expected_dec[]; -extern const int fres_expected_base[]; -extern const int fres_expected_dec[]; +struct BaseAndDec +{ + int m_base; + int m_dec; +}; +extern const std::array<BaseAndDec, 32> frsqrte_expected; +extern const std::array<BaseAndDec, 32> fres_expected; // PowerPC approximation algorithms double ApproximateReciprocalSquareRoot(double val); |
