Permalink
Browse files

jit: Report blocks with uneaten VFPU prefixes.

There may be options to avoid, like continuing these blocks, especially if
they're likely or something.
  • Loading branch information...
unknownbrackets committed Jan 1, 2018
1 parent 28acc2e commit 8ffb0101fe8c401267ce43edef4eaa75b412fe53
View
@@ -218,7 +218,7 @@ void ArmJit::Compile(u32 em_address) {
// Drat. The VFPU hit an uneaten prefix at the end of a block.
if (js.startDefaultPrefix && js.MayHavePrefix()) {
WARN_LOG(JIT, "An uneaten prefix at end of block: %08x", GetCompilerPC() - 4);
WARN_LOG_REPORT(JIT, "An uneaten prefix at end of block: %08x", GetCompilerPC() - 4);
js.LogPrefix();
// Let's try that one more time. We won't get back here because we toggled the value.
@@ -204,7 +204,7 @@ void Arm64Jit::Compile(u32 em_address) {
// Drat. The VFPU hit an uneaten prefix at the end of a block.
if (js.startDefaultPrefix && js.MayHavePrefix()) {
WARN_LOG(JIT, "An uneaten prefix at end of block: %08x", GetCompilerPC() - 4);
WARN_LOG_REPORT(JIT, "An uneaten prefix at end of block: %08x", GetCompilerPC() - 4);
js.LogPrefix();
// Let's try that one more time. We won't get back here because we toggled the value.
@@ -105,7 +105,7 @@ void IRFrontend::CompileDelaySlot() {
js.inDelaySlot = false;
}
bool IRFrontend::CheckRounding() {
bool IRFrontend::CheckRounding(u32 blockAddress) {
bool cleanSlate = false;
if (js.hasSetRounding && !js.lastSetRounding) {
WARN_LOG(JIT, "Detected rounding mode usage, rebuilding jit with checks");
@@ -116,7 +116,7 @@ bool IRFrontend::CheckRounding() {
// Drat. The VFPU hit an uneaten prefix at the end of a block.
if (js.startDefaultPrefix && js.MayHavePrefix()) {
WARN_LOG(JIT, "An uneaten prefix at end of block");
WARN_LOG_REPORT(JIT, "An uneaten prefix at end of block for %08x", blockAddress);
logBlocks = 1;
js.LogPrefix();
@@ -86,7 +86,7 @@ class IRFrontend : public MIPSFrontendInterface {
int Replace_fabsf() override;
void DoState(PointerWrap &p);
bool CheckRounding(); // returns true if we need a do-over
bool CheckRounding(u32 blockAddress); // returns true if we need a do-over
void DoJit(u32 em_address, std::vector<IRInst> &instructions, std::vector<u32> &constants, u32 &mipsBytes);
View
@@ -74,7 +74,7 @@ void IRJit::Compile(u32 em_address) {
// Overwrites the first instruction, and also updates stats.
blocks_.FinalizeBlock(block_num);
if (frontend_.CheckRounding()) {
if (frontend_.CheckRounding(em_address)) {
// Our assumptions are all wrong so it's clean-slate time.
ClearCache();
Compile(em_address);
View
@@ -286,7 +286,7 @@ void Jit::Compile(u32 em_address) {
// Drat. The VFPU hit an uneaten prefix at the end of a block.
if (js.startDefaultPrefix && js.MayHavePrefix()) {
WARN_LOG(JIT, "An uneaten prefix at end of block: %08x", GetCompilerPC() - 4);
WARN_LOG_REPORT(JIT, "An uneaten prefix at end of block: %08x", GetCompilerPC() - 4);
js.LogPrefix();
// Let's try that one more time. We won't get back here because we toggled the value.

0 comments on commit 8ffb010

Please sign in to comment.