view gen.c @ 666:b68039895627

In theory, the Z80 core should work on 32-bit builds now; however, I suspect there is some code that cannot deal with most of the Z80 registers not having a native register so more work will be needed
author Michael Pavone <pavone@retrodev.com>
date Fri, 02 Jan 2015 13:47:34 -0800
parents c8fefa140c80
children 724bbec47f86
line wrap: on
line source

#include <stdio.h>
#include <stdlib.h>
#include "gen.h"
#include "mem.h"

void init_code_info(code_info *code)
{
	size_t size = CODE_ALLOC_SIZE;
	code->cur = alloc_code(&size);
	if (!code->cur) {
		fputs("Failed to allocate memory for generated code\n", stderr);
		exit(1);
	}
	code->last = code->cur + size/sizeof(code_word) - RESERVE_WORDS;
}