Added recompiler block tree to x86-64 recompiler. Fixed return value in codeblock_tree_find() that could cause GCC to generate bad code.

This commit is contained in:
SarahW 2016-04-08 20:49:03 +01:00
commit 14df80109b
2 changed files with 7 additions and 1 deletions

View file

@ -65,12 +65,14 @@ static inline codeblock_t *codeblock_tree_find(uint32_t phys)
while (block)
{
if (phys == block->phys)
return block;
break;
else if (phys < block->phys)
block = block->left;
else
block = block->right;
}
return block;
}
static inline void codeblock_tree_add(codeblock_t *new_block)

View file

@ -126,6 +126,8 @@ static void delete_block(codeblock_t *block)
fatal("Deleting deleted block\n");
block->pc = 0;
codeblock_tree_delete(block);
if (block->prev)
{
block->prev->next = block->next;
@ -464,6 +466,8 @@ void codegen_block_end()
// pclog("End block %i\n", block_num);
recomp_page = -1;
codeblock_tree_add(block);
}
void codegen_flush()