diff --git a/pcsx2/DebugTools/DebugInterface.cpp b/pcsx2/DebugTools/DebugInterface.cpp index b9eb5982ca150..7d2ffadfd3f67 100644 --- a/pcsx2/DebugTools/DebugInterface.cpp +++ b/pcsx2/DebugTools/DebugInterface.cpp @@ -55,12 +55,18 @@ class MipsExpressionFunctions : public IExpressionFunctions { char reg[8]; std::snprintf(reg, std::size(reg), "r%d", i); - if (StringUtil::Strcasecmp(str, reg) == 0 || StringUtil::Strcasecmp(str, cpu->getRegisterName(0, i)) == 0) { referenceIndex = i; return true; } + + std::snprintf(reg, std::size(reg), "f%d", i); + if (StringUtil::Strcasecmp(str, reg) == 0) + { + referenceIndex = i | REF_INDEX_FPU; + return true; + } } if (StringUtil::Strcasecmp(str, "pc") == 0) @@ -145,6 +151,10 @@ class MipsExpressionFunctions : public IExpressionFunctions } return 0; } + if (referenceIndex & REF_INDEX_FPU) + { + return cpu->getRegister(EECAT_FPR, referenceIndex & 0x1F)._u64[0]; + } return -1; } diff --git a/pcsx2/DebugTools/ExpressionParser.cpp b/pcsx2/DebugTools/ExpressionParser.cpp index cc9c83d322d13..52638fb288379 100644 --- a/pcsx2/DebugTools/ExpressionParser.cpp +++ b/pcsx2/DebugTools/ExpressionParser.cpp @@ -539,10 +539,16 @@ bool parsePostfixExpression(PostfixExpression& exp, IExpressionFunctions* funcs, valueStack.push_back(arg[1]