mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-03 22:51:05 +00:00
Merge pull request #1944 from unknownbrackets/reporting
Add reporting for branch in delay slot and cwd thing
This commit is contained in:
commit
fc4107ff16
@ -16,8 +16,9 @@
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "Globals.h"
|
||||
#include "Common.h"
|
||||
#include "ISOFileSystem.h"
|
||||
#include "Common/Common.h"
|
||||
#include "Core/FileSystems/ISOFileSystem.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <ctype.h>
|
||||
@ -36,20 +37,20 @@ static bool parseLBN(std::string filename, u32 *sectorStart, u32 *readSize)
|
||||
|
||||
int offset = 0;
|
||||
if (sscanf(filename_c + pos, "%x%n", sectorStart, &offset) != 1)
|
||||
WARN_LOG(FILESYS, "Invalid LBN reference: %s", filename_c);
|
||||
WARN_LOG_REPORT(FILESYS, "Invalid LBN reference: %s", filename_c);
|
||||
pos += offset;
|
||||
|
||||
if (filename.compare(pos, sizeof("_size") - 1, "_size") != 0)
|
||||
WARN_LOG(FILESYS, "Invalid LBN reference: %s", filename_c);
|
||||
WARN_LOG_REPORT(FILESYS, "Invalid LBN reference: %s", filename_c);
|
||||
pos += sizeof("_size") - 1;
|
||||
|
||||
offset = 0;
|
||||
if (sscanf(filename_c + pos, "%x%n", readSize, &offset) != 1)
|
||||
WARN_LOG(FILESYS, "Invalid LBN reference: %s", filename_c);
|
||||
WARN_LOG_REPORT(FILESYS, "Invalid LBN reference: %s", filename_c);
|
||||
pos += offset;
|
||||
|
||||
if (filename.size() > pos)
|
||||
WARN_LOG(FILESYS, "Incomplete LBN reference: %s", filename_c);
|
||||
WARN_LOG_REPORT(FILESYS, "Incomplete LBN reference: %s", filename_c);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -17,8 +17,9 @@
|
||||
|
||||
#include <set>
|
||||
#include "Common/StringUtils.h"
|
||||
#include "../HLE/sceKernelThread.h"
|
||||
#include "MetaFileSystem.h"
|
||||
#include "Core/FileSystems/MetaFileSystem.h"
|
||||
#include "Core/HLE/sceKernelThread.h"
|
||||
#include "Core/Reporting.h"
|
||||
|
||||
static bool ApplyPathStringToComponentsVector(std::vector<std::string> &vector, const std::string &pathString)
|
||||
{
|
||||
@ -190,7 +191,7 @@ bool MetaFileSystem::MapFilePath(const std::string &_inpath, std::string &outpat
|
||||
{
|
||||
//TODO: emulate PSP's error 8002032C: "no current working directory" if relative... may break things requiring fixes elsewhere
|
||||
if (inpath.find(':') == std::string::npos /* means path is relative */)
|
||||
WARN_LOG(HLE, "Path is relative, but current directory not set for thread %i. Should give error, instead falling back to %s", currentThread, startingDirectory.c_str());
|
||||
WARN_LOG_REPORT(HLE, "Path is relative, but current directory not set for thread %i. Should give error, instead falling back to %s", currentThread, startingDirectory.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -336,7 +337,7 @@ int MetaFileSystem::ChDir(const std::string &dir)
|
||||
}
|
||||
}
|
||||
|
||||
WARN_LOG(HLE, "ChDir failed to map device for \"%s\", failing", dir.c_str());
|
||||
WARN_LOG_REPORT(HLE, "ChDir failed to map device for \"%s\", failing", dir.c_str());
|
||||
return SCE_KERNEL_ERROR_NODEV;
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,8 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "Core/Reporting.h"
|
||||
|
||||
#include "Core/HLE/HLE.h"
|
||||
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
@ -51,7 +53,7 @@ namespace MIPSComp
|
||||
void Jit::BranchRSRTComp(u32 op, ArmGen::CCFlags cc, bool likely)
|
||||
{
|
||||
if (js.inDelaySlot) {
|
||||
ERROR_LOG(JIT, "Branch in delay slot at %08x", js.compilerPC);
|
||||
ERROR_LOG_REPORT(JIT, "Branch in RSRTComp delay slot at %08x", js.compilerPC);
|
||||
return;
|
||||
}
|
||||
int offset = (signed short)(op&0xFFFF)<<2;
|
||||
@ -111,7 +113,7 @@ void Jit::BranchRSRTComp(u32 op, ArmGen::CCFlags cc, bool likely)
|
||||
void Jit::BranchRSZeroComp(u32 op, ArmGen::CCFlags cc, bool andLink, bool likely)
|
||||
{
|
||||
if (js.inDelaySlot) {
|
||||
ERROR_LOG(JIT, "Branch in delay slot at %08x", js.compilerPC);
|
||||
ERROR_LOG_REPORT(JIT, "Branch in RSZeroComp delay slot at %08x", js.compilerPC);
|
||||
return;
|
||||
}
|
||||
int offset = (signed short)(op&0xFFFF)<<2;
|
||||
@ -206,7 +208,7 @@ void Jit::Comp_RelBranchRI(u32 op)
|
||||
void Jit::BranchFPFlag(u32 op, ArmGen::CCFlags cc, bool likely)
|
||||
{
|
||||
if (js.inDelaySlot) {
|
||||
ERROR_LOG(JIT, "Branch in delay slot at %08x", js.compilerPC);
|
||||
ERROR_LOG_REPORT(JIT, "Branch in FPFlag delay slot at %08x", js.compilerPC);
|
||||
return;
|
||||
}
|
||||
int offset = (signed short)(op & 0xFFFF) << 2;
|
||||
@ -320,7 +322,7 @@ void Jit::Comp_VBranch(u32 op)
|
||||
void Jit::Comp_Jump(u32 op)
|
||||
{
|
||||
if (js.inDelaySlot) {
|
||||
ERROR_LOG(JIT, "Branch in delay slot at %08x", js.compilerPC);
|
||||
ERROR_LOG_REPORT(JIT, "Branch in Jump delay slot at %08x", js.compilerPC);
|
||||
return;
|
||||
}
|
||||
u32 off = ((op & 0x03FFFFFF) << 2);
|
||||
@ -352,7 +354,7 @@ void Jit::Comp_Jump(u32 op)
|
||||
void Jit::Comp_JumpReg(u32 op)
|
||||
{
|
||||
if (js.inDelaySlot) {
|
||||
ERROR_LOG(JIT, "Branch in delay slot at %08x", js.compilerPC);
|
||||
ERROR_LOG_REPORT(JIT, "Branch in JumpReg delay slot at %08x", js.compilerPC);
|
||||
return;
|
||||
}
|
||||
int rs = _RS;
|
||||
|
@ -15,6 +15,8 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "Core/Reporting.h"
|
||||
|
||||
#include "../../HLE/HLE.h"
|
||||
#include "../../Host.h"
|
||||
|
||||
@ -127,7 +129,7 @@ void Jit::BranchRSRTComp(u32 op, Gen::CCFlags cc, bool likely)
|
||||
{
|
||||
CONDITIONAL_LOG;
|
||||
if (js.inDelaySlot) {
|
||||
ERROR_LOG(JIT, "Branch in delay slot at %08x", js.compilerPC);
|
||||
ERROR_LOG_REPORT(JIT, "Branch in RSRTComp delay slot at %08x", js.compilerPC);
|
||||
return;
|
||||
}
|
||||
int offset = (signed short)(op&0xFFFF)<<2;
|
||||
@ -183,7 +185,7 @@ void Jit::BranchRSZeroComp(u32 op, Gen::CCFlags cc, bool andLink, bool likely)
|
||||
{
|
||||
CONDITIONAL_LOG;
|
||||
if (js.inDelaySlot) {
|
||||
ERROR_LOG(JIT, "Branch in delay slot at %08x", js.compilerPC);
|
||||
ERROR_LOG_REPORT(JIT, "Branch in RSZeroComp delay slot at %08x", js.compilerPC);
|
||||
return;
|
||||
}
|
||||
int offset = (signed short)(op&0xFFFF)<<2;
|
||||
@ -278,7 +280,7 @@ void Jit::BranchFPFlag(u32 op, Gen::CCFlags cc, bool likely)
|
||||
{
|
||||
CONDITIONAL_LOG;
|
||||
if (js.inDelaySlot) {
|
||||
ERROR_LOG(JIT, "Branch in delay slot at %08x", js.compilerPC);
|
||||
ERROR_LOG_REPORT(JIT, "Branch in FPFlag delay slot at %08x", js.compilerPC);
|
||||
return;
|
||||
}
|
||||
int offset = (signed short)(op & 0xFFFF) << 2;
|
||||
@ -339,7 +341,7 @@ void Jit::BranchVFPUFlag(u32 op, Gen::CCFlags cc, bool likely)
|
||||
{
|
||||
CONDITIONAL_LOG;
|
||||
if (js.inDelaySlot) {
|
||||
ERROR_LOG(JIT, "Branch in delay slot at %08x", js.compilerPC);
|
||||
ERROR_LOG_REPORT(JIT, "Branch in VFPU delay slot at %08x", js.compilerPC);
|
||||
return;
|
||||
}
|
||||
int offset = (signed short)(op & 0xFFFF) << 2;
|
||||
@ -403,7 +405,7 @@ void Jit::Comp_Jump(u32 op)
|
||||
{
|
||||
CONDITIONAL_LOG;
|
||||
if (js.inDelaySlot) {
|
||||
ERROR_LOG(JIT, "Branch in delay slot at %08x", js.compilerPC);
|
||||
ERROR_LOG_REPORT(JIT, "Branch in Jump delay slot at %08x", js.compilerPC);
|
||||
return;
|
||||
}
|
||||
u32 off = ((op & 0x3FFFFFF) << 2);
|
||||
@ -440,7 +442,7 @@ void Jit::Comp_JumpReg(u32 op)
|
||||
{
|
||||
CONDITIONAL_LOG;
|
||||
if (js.inDelaySlot) {
|
||||
ERROR_LOG(JIT, "Branch in delay slot at %08x", js.compilerPC);
|
||||
ERROR_LOG_REPORT(JIT, "Branch in JumpReg delay slot at %08x", js.compilerPC);
|
||||
return;
|
||||
}
|
||||
int rs = _RS;
|
||||
|
Loading…
Reference in New Issue
Block a user