about summary refs log tree commit diff stats
path: root/miasm2/jitter/arch/JitCore.h
diff options
context:
space:
mode:
authorserpilliere <fabrice.desclaux@cea.fr>2015-04-19 00:24:32 +0200
committerserpilliere <fabrice.desclaux@cea.fr>2015-04-22 18:37:56 +0200
commit5699ee60b9052a936fa1e511a4cc455cfe8b8dc4 (patch)
tree68f6d538a9ef16edc7aa5730320796d550c5cd91 /miasm2/jitter/arch/JitCore.h
parent49343533ce23277187d526f1b86f84307b77200a (diff)
downloadmiasm-5699ee60b9052a936fa1e511a4cc455cfe8b8dc4.tar.gz
miasm-5699ee60b9052a936fa1e511a4cc455cfe8b8dc4.zip
Jitter: Factorize common cpu attributes in JitCpu; Update APIs in consequence
Diffstat (limited to 'miasm2/jitter/arch/JitCore.h')
-rw-r--r--miasm2/jitter/arch/JitCore.h73
1 files changed, 0 insertions, 73 deletions
diff --git a/miasm2/jitter/arch/JitCore.h b/miasm2/jitter/arch/JitCore.h
deleted file mode 100644
index 735cbd27..00000000
--- a/miasm2/jitter/arch/JitCore.h
+++ /dev/null
@@ -1,73 +0,0 @@
-
-#define PyGetInt(item, value)						\
-	if (PyInt_Check(item)){						\
-		value = (uint64_t)PyInt_AsLong(item);			\
-	}								\
-	else if (PyLong_Check(item)){					\
-		value = (uint64_t)PyLong_AsUnsignedLongLong(item);	\
-	}								\
-	else{								\
-		RAISE(PyExc_TypeError,"arg must be int");		\
-	}								\
-
-
-#define PyGetInt_ret0(item, value)					\
-	if (PyInt_Check(item)){						\
-		value = (uint64_t)PyInt_AsLong(item);			\
-	}								\
-	else if (PyLong_Check(item)){					\
-		value = (uint64_t)PyLong_AsUnsignedLongLong(item);	\
-	}								\
-	else{								\
-		printf("error\n"); return 0;				\
-	}								\
-
-
-
-#define getset_reg_u64(regname)						\
-	static PyObject *JitCpu_get_ ## regname  (JitCpu *self, void *closure) \
-	{								\
-		return PyLong_FromUnsignedLongLong((uint64_t)(self->vmcpu.  regname  )); \
-	}								\
-	static int JitCpu_set_ ## regname  (JitCpu *self, PyObject *value, void *closure) \
-	{								\
-		uint64_t val;						\
-		PyGetInt_ret0(value, val);				\
-		self->vmcpu.  regname   = val;				\
-		return 0;						\
-	}
-
-#define getset_reg_u32(regname)						\
-	static PyObject *JitCpu_get_ ## regname  (JitCpu *self, void *closure) \
-	{								\
-		return PyLong_FromUnsignedLongLong((uint32_t)(self->vmcpu.  regname  )); \
-	}								\
-	static int JitCpu_set_ ## regname  (JitCpu *self, PyObject *value, void *closure) \
-	{								\
-		uint32_t val;						\
-		PyGetInt_ret0(value, val);				\
-		self->vmcpu.  regname   = val;				\
-		return 0;						\
-	}
-
-
-#define getset_reg_u16(regname)						\
-	static PyObject *JitCpu_get_ ## regname  (JitCpu *self, void *closure) \
-	{								\
-		return PyLong_FromUnsignedLongLong((uint16_t)(self->vmcpu.  regname  )); \
-	}								\
-	static int JitCpu_set_ ## regname  (JitCpu *self, PyObject *value, void *closure) \
-	{								\
-		uint16_t val;						\
-		PyGetInt_ret0(value, val);				\
-		self->vmcpu.  regname   = val;				\
-		return 0;						\
-	}
-
-
-typedef struct {
-	uint8_t is_local;
-	uint64_t address;
-} block_id;
-
-void Resolve_dst(block_id* BlockDst, uint64_t addr, uint64_t is_local);