New recompiler fixes: fixed cycle accumulation and a division by zero.

This commit is contained in:
OBattler
2020-07-13 22:18:21 +02:00
parent d8ff8e2624
commit 63975d636b
2 changed files with 2 additions and 3 deletions

View File

@@ -1,7 +1,6 @@
enum
{
ACCREG_ins = 0,
ACCREG_cycles = 1,
ACCREG_cycles = 0,
ACCREG_COUNT
};

View File

@@ -62,7 +62,7 @@ int codegen_can_unroll_full(codeblock_t *block, ir_data_t *ir, uint32_t next_pc,
return 0;
max_unroll = UNROLL_MAX_UOPS / ((ir->wr_pos-start)+6);
if (max_unroll > (UNROLL_MAX_REG_REFERENCES / max_version_refcount))
if ((max_version_refcount != 0) && (max_unroll > (UNROLL_MAX_REG_REFERENCES / max_version_refcount)))
max_unroll = (UNROLL_MAX_REG_REFERENCES / max_version_refcount);
if (max_unroll > UNROLL_MAX_COUNT)
max_unroll = UNROLL_MAX_COUNT;