diff backend.h @ 563:c8fefa140c80

Moved some generic stuff from backend.h gen_arm.h and gen_arm.c into gen.h and gen.c. Added a couple fields to cpu_options so that gen_mem_fun can be made guest CPU generic
author Michael Pavone <pavone@retrodev.com>
date Mon, 24 Feb 2014 09:55:24 -0800
parents dc9f178085a0
children 8e395210f50f
line wrap: on
line diff
--- a/backend.h	Mon Feb 24 01:30:16 2014 -0800
+++ b/backend.h	Mon Feb 24 09:55:24 2014 -0800
@@ -8,6 +8,7 @@
 
 #include <stdint.h>
 #include <stdio.h>
+#include "gen.h"
 
 #define INVALID_OFFSET 0xFFFFFFFF
 #define EXTENSION_WORD 0xFFFFFFFE
@@ -20,12 +21,6 @@
 	uint8_t cycles;
 } x86_ea;
 
-#if defined(X86_64) || defined(X86_32)
-typedef uint8_t* code_ptr;
-#else
-typedef uint32_t* code_ptr;
-#endif
-
 typedef struct {
 	uint8_t  *base;
 	int32_t  *offsets;
@@ -56,6 +51,8 @@
 	code_ptr        handle_cycle_limit;
 	code_ptr        handle_cycle_limit_int;
 	uint8_t			context_reg;
+	uint8_t         cycles;
+	uint8_t         limit;
 	uint8_t			scratch1;
 	uint8_t			scratch2;
 } cpu_options;