Skip to content
Permalink
Browse files
Merge pull request #7624 from lioncash/paired-single
PowerPC: Remove separate macros for paired singles
  • Loading branch information
lioncash committed Dec 28, 2018
2 parents 8c9f553 + 244d083 commit b7db1f0
Show file tree
Hide file tree
Showing 15 changed files with 457 additions and 235 deletions.
@@ -272,8 +272,8 @@ void RunCodeHandler()
// Registers FPR0->13 are volatile
for (int i = 0; i < 14; ++i)
{
PowerPC::HostWrite_U64(riPS0(i), SP + 24 + 2 * i * sizeof(u64));
PowerPC::HostWrite_U64(riPS1(i), SP + 24 + (2 * i + 1) * sizeof(u64));
PowerPC::HostWrite_U64(rPS(i).PS0AsU64(), SP + 24 + 2 * i * sizeof(u64));
PowerPC::HostWrite_U64(rPS(i).PS1AsU64(), SP + 24 + (2 * i + 1) * sizeof(u64));
}
DEBUG_LOG(ACTIONREPLAY,
"GeckoCodes: Initiating phantom branch-and-link. "
@@ -64,8 +64,8 @@ void GeckoReturnTrampoline()
PowerPC::ExpandCR(PowerPC::HostRead_U32(SP + 20));
for (int i = 0; i < 14; ++i)
{
riPS0(i) = PowerPC::HostRead_U64(SP + 24 + 2 * i * sizeof(u64));
riPS1(i) = PowerPC::HostRead_U64(SP + 24 + (2 * i + 1) * sizeof(u64));
rPS(i).SetBoth(PowerPC::HostRead_U64(SP + 24 + 2 * i * sizeof(u64)),
PowerPC::HostRead_U64(SP + 24 + (2 * i + 1) * sizeof(u64)));
}
}
}
@@ -15,7 +15,7 @@ u32 HLE::SystemVABI::VAList::GetGPR(u32 gpr) const

double HLE::SystemVABI::VAList::GetFPR(u32 fpr) const
{
return rPS0(fpr);
return rPS(fpr).PS0AsDouble();
}

HLE::SystemVABI::VAListStruct::VAListStruct(u32 address)
@@ -125,8 +125,10 @@ static void Trace(UGeckoInstruction& inst)
std::string fregs = "";
for (int i = 0; i < 32; i++)
{
fregs += StringFromFormat("f%02d: %08" PRIx64 " %08" PRIx64 " ", i, PowerPC::ppcState.ps[i][0],
PowerPC::ppcState.ps[i][1]);
const auto& ps = PowerPC::ppcState.ps[i];

fregs +=
StringFromFormat("f%02d: %08" PRIx64 " %08" PRIx64 " ", i, ps.PS0AsU64(), ps.PS1AsU64());
}

const std::string ppc_inst = Common::GekkoDisassembler::Disassemble(inst.hex, PC);

0 comments on commit b7db1f0

Please sign in to comment.