mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Fix paired loadstore to use correct load/store calls.
psq_st performs one store, and psq_ld one load, from the perspective of the MMU; getting this wrong leads to potentially incorrect behavior (incorrect page faults, weirdness with the gather pipe, etc.). Fix this, and stop masking the address when checking for gather pipe writes. Also a bunch of cleanup.
This commit is contained in:
@@ -305,6 +305,9 @@ union UGeckoInstruction
|
||||
enum EQuantizeType : u32
|
||||
{
|
||||
QUANTIZE_FLOAT = 0,
|
||||
QUANTIZE_INVALID1 = 1,
|
||||
QUANTIZE_INVALID2 = 2,
|
||||
QUANTIZE_INVALID3 = 3,
|
||||
QUANTIZE_U8 = 4,
|
||||
QUANTIZE_U16 = 5,
|
||||
QUANTIZE_S8 = 6,
|
||||
|
||||
@@ -312,8 +312,8 @@ private:
|
||||
static u32 Helper_Get_EA_UX(const UGeckoInstruction _inst);
|
||||
|
||||
// paired helper
|
||||
static float Helper_Dequantize(const u32 _Addr, const EQuantizeType _quantizeType, const unsigned int _uScale);
|
||||
static void Helper_Quantize (const u32 _Addr, const double _fValue, const EQuantizeType _quantizeType, const unsigned _uScale);
|
||||
static void Helper_Dequantize(u32 addr, u32 instI, u32 instRD, u32 instW);
|
||||
static void Helper_Quantize(u32 addr, u32 instI, u32 instRS, u32 instW);
|
||||
|
||||
// other helper
|
||||
static u32 Helper_Mask(int mb, int me);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -27,22 +27,19 @@ using namespace ArmGen;
|
||||
|
||||
JitArmAsmRoutineManager asm_routines;
|
||||
|
||||
static void WriteDual32(u32 value1, u32 value2, u32 address)
|
||||
static void WriteDual8(u32 val1, u32 val2, u32 addr)
|
||||
{
|
||||
PowerPC::Write_U32(value1, address);
|
||||
PowerPC::Write_U32(value2, address + 4);
|
||||
PowerPC::Write_U16(((u16)(u8)val1 << 8) | (u16)(u8)val2, addr);
|
||||
}
|
||||
|
||||
static void WriteDual16(u32 value1, u32 value2, u32 address)
|
||||
static void WriteDual16(u32 val1, u32 val2, u32 addr)
|
||||
{
|
||||
PowerPC::Write_U16(value1, address);
|
||||
PowerPC::Write_U16(value2, address + 2);
|
||||
PowerPC::Write_U32(((u32)(u16)val1 << 16) | (u32)(u16)val2, addr);
|
||||
}
|
||||
|
||||
static void WriteDual8(u32 value1, u32 value2, u32 address)
|
||||
static void WriteDual32(u32 val1, u32 val2, u32 addr)
|
||||
{
|
||||
PowerPC::Write_U8(value1, address);
|
||||
PowerPC::Write_U8(value2, address + 1);
|
||||
PowerPC::Write_U64(((u64)val1 << 32) | (u64)val2, addr);
|
||||
}
|
||||
|
||||
void JitArmAsmRoutineManager::Generate()
|
||||
|
||||
@@ -238,7 +238,7 @@ __forceinline static void WriteToHardware(u32 em_address, const T data)
|
||||
{
|
||||
// First, let's check for FIFO writes, since they are probably the most common
|
||||
// reason we end up in this function:
|
||||
if (flag == FLAG_WRITE && (em_address & 0xFFFFF000) == 0xCC008000)
|
||||
if (flag == FLAG_WRITE && em_address == 0xCC008000)
|
||||
{
|
||||
switch (sizeof(T))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user