mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
+3
-1
@@ -5,7 +5,7 @@ Thumbs.db
|
||||
# Ignore autogenerated source files
|
||||
Source/Core/Common/scmrev.h
|
||||
# Ignore files output by build
|
||||
/[Bb]uild/
|
||||
/[Bb]uild[-_]*/
|
||||
/[Bb]inary/
|
||||
/obj/
|
||||
# Ignore various files created by visual studio/msbuild
|
||||
@@ -22,3 +22,5 @@ CMakeLists.txt.user
|
||||
*~
|
||||
# Ignore transifex configuration directory
|
||||
.tx
|
||||
# Ignore kdevelop files/dirs
|
||||
*.kdev4
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,24 +8,29 @@
|
||||
|
||||
namespace FPURoundMode
|
||||
{
|
||||
enum RoundModes : u32
|
||||
// TODO: MSVC currently produces broken code:
|
||||
// https://connect.microsoft.com/VisualStudio/feedback/details/828892/vc-2013-miscompilation-with-enums-and-bit-fields
|
||||
// Once that is fixed, change types in SetRoundMode(), SetSIMDMode(), and in UReg_FPSCR to 'RoundMode'.
|
||||
|
||||
enum RoundMode
|
||||
{
|
||||
ROUND_NEAR = 0,
|
||||
ROUND_CHOP = 1,
|
||||
ROUND_UP = 2,
|
||||
ROUND_DOWN = 3
|
||||
};
|
||||
enum PrecisionModes : u32
|
||||
enum PrecisionMode
|
||||
{
|
||||
PREC_24 = 0,
|
||||
PREC_53 = 1,
|
||||
PREC_64 = 2
|
||||
};
|
||||
void SetRoundMode(RoundModes mode);
|
||||
|
||||
void SetPrecisionMode(PrecisionModes mode);
|
||||
void SetRoundMode(int mode);
|
||||
|
||||
void SetSIMDMode(RoundModes rounding_mode, bool non_ieee_mode);
|
||||
void SetPrecisionMode(PrecisionMode mode);
|
||||
|
||||
void SetSIMDMode(int rounding_mode, bool non_ieee_mode);
|
||||
|
||||
/*
|
||||
* There are two different flavors of float to int conversion:
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
// Generic, do nothing
|
||||
namespace FPURoundMode
|
||||
{
|
||||
void SetRoundMode(RoundModes mode)
|
||||
void SetRoundMode(int mode)
|
||||
{
|
||||
}
|
||||
void SetPrecisionMode(PrecisionModes mode)
|
||||
void SetPrecisionMode(PrecisionMode mode)
|
||||
{
|
||||
}
|
||||
void SetSIMDMode(RoundModes rounding_mode, bool non_ieee_mode)
|
||||
void SetSIMDMode(int rounding_mode, bool non_ieee_mode)
|
||||
{
|
||||
}
|
||||
void SaveSIMDState()
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace FPURoundMode
|
||||
static u32 saved_sse_state = _mm_getcsr();
|
||||
static const u32 default_sse_state = _mm_getcsr();
|
||||
|
||||
void SetRoundMode(RoundModes mode)
|
||||
void SetRoundMode(int mode)
|
||||
{
|
||||
// Set FPU rounding mode to mimic the PowerPC's
|
||||
#ifdef _M_X86_32
|
||||
@@ -49,7 +49,7 @@ namespace FPURoundMode
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetPrecisionMode(PrecisionModes mode)
|
||||
void SetPrecisionMode(PrecisionMode mode)
|
||||
{
|
||||
#ifdef _M_X86_32
|
||||
// sets the floating-point lib to 53-bit
|
||||
@@ -75,7 +75,7 @@ namespace FPURoundMode
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSIMDMode(RoundModes rounding_mode, bool non_ieee_mode)
|
||||
void SetSIMDMode(int rounding_mode, bool non_ieee_mode)
|
||||
{
|
||||
// OR-mask for disabling FPU exceptions (bits 7-12 in the MXCSR register)
|
||||
const u32 EXCEPTION_MASK = 0x1F80;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/FPURoundMode.h"
|
||||
|
||||
// --- Gekko Instruction ---
|
||||
|
||||
@@ -390,7 +389,7 @@ union UReg_FPSCR
|
||||
struct
|
||||
{
|
||||
// Rounding mode (towards: nearest, zero, +inf, -inf)
|
||||
FPURoundMode::RoundModes RN : 2;
|
||||
u32 RN : 2;
|
||||
// Non-IEEE mode enable (aka flush-to-zero)
|
||||
u32 NI : 1;
|
||||
// Inexact exception enable
|
||||
|
||||
@@ -49,7 +49,7 @@ static void FPSCRtoFPUSettings(UReg_FPSCR fp)
|
||||
}
|
||||
|
||||
// Set SSE rounding mode and denormal handling
|
||||
FPURoundMode::SetSIMDMode(FPSCR.RN, FPSCR.NI);
|
||||
FPURoundMode::SetSIMDMode(fp.RN, fp.NI);
|
||||
}
|
||||
|
||||
void Interpreter::mtfsb0x(UGeckoInstruction _inst)
|
||||
|
||||
@@ -2190,6 +2190,7 @@ void Jit64::twx(UGeckoInstruction inst)
|
||||
FixupBranch ag = J_CC(CC_G);
|
||||
FixupBranch ae = J_CC(CC_Z);
|
||||
// FIXME: will never be reached. But also no known code uses it...
|
||||
_assert_msg_(DYNA_REC, (inst.TO & 3) == 0, "Seems like something actually does use this.");
|
||||
FixupBranch ll = J_CC(CC_NO);
|
||||
FixupBranch lg = J_CC(CC_O);
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ TEST_F(MappingTest, ReadWriteDirect)
|
||||
m_mapping->Register(0xCC001234, MMIO::DirectRead<u16>(&target_16), MMIO::DirectWrite<u16>(&target_16));
|
||||
m_mapping->Register(0xCC001234, MMIO::DirectRead<u32>(&target_32), MMIO::DirectWrite<u32>(&target_32));
|
||||
|
||||
for (int i = 0; i < 100; ++i)
|
||||
for (u32 i = 0; i < 100; ++i)
|
||||
{
|
||||
u8 val8; m_mapping->Read(0xCC001234, &val8); EXPECT_EQ(i, val8);
|
||||
u16 val16; m_mapping->Read(0xCC001234, &val16); EXPECT_EQ(i, val16);
|
||||
|
||||
Reference in New Issue
Block a user