Move dynarec code memory out of codeblock structure.

This commit is contained in:
SarahW 2018-11-28 18:43:40 +00:00
commit d63176e472
8 changed files with 51 additions and 26 deletions

View file

@ -30,7 +30,10 @@
*/
/*Hack until better memory management written*/
#define BLOCK_DATA_SIZE 0x10000
/*This is deliberately _not_ a power of two, to avoid cache aliasing problems.
Try changing this to a power of two, and watch the performance plummet :)
It's probably best for this to be a multiple of the cache line size though*/
#define BLOCK_DATA_SIZE 0xff80
typedef struct codeblock_t
{
@ -61,9 +64,11 @@ typedef struct codeblock_t
uint32_t status;
uint32_t flags;
uint8_t data[BLOCK_DATA_SIZE];
uint8_t *data;
} codeblock_t;
uint8_t *codeblock_data;
/*Code block uses FPU*/
#define CODEBLOCK_HAS_FPU 1
/*Code block is always entered with the same FPU top-of-stack*/