about summary refs log tree commit diff stats
path: root/miasm2/jitter
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2018-02-09 15:56:08 +0100
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2018-02-09 15:59:17 +0100
commit400fce77dcff990537966e2849630da482e9817e (patch)
tree1eb25995b2e0c1de4fe34643ef3ab564515564f2 /miasm2/jitter
parent4a6f952905200687e5ff04ce2199defb481bbbf1 (diff)
downloadmiasm-400fce77dcff990537966e2849630da482e9817e.tar.gz
miasm-400fce77dcff990537966e2849630da482e9817e.zip
Aarch64: add interrupt num & cpu accesses
Diffstat (limited to '')
-rw-r--r--miasm2/jitter/arch/JitCore_aarch64.c10
-rw-r--r--miasm2/jitter/arch/JitCore_aarch64.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/miasm2/jitter/arch/JitCore_aarch64.c b/miasm2/jitter/arch/JitCore_aarch64.c
index 03113d30..e10d847e 100644
--- a/miasm2/jitter/arch/JitCore_aarch64.c
+++ b/miasm2/jitter/arch/JitCore_aarch64.c
@@ -50,6 +50,10 @@ reg_dict gpreg_dict[] = {
 	{.name = "nf", .offset = offsetof(vm_cpu_t, nf)},
 	{.name = "of", .offset = offsetof(vm_cpu_t, of)},
 	{.name = "cf", .offset = offsetof(vm_cpu_t, cf)},
+
+	{.name = "exception_flags", .offset = offsetof(vm_cpu_t, exception_flags)},
+	{.name = "interrupt_num", .offset = offsetof(vm_cpu_t, interrupt_num)},
+
 };
 
 /************************** JitCpu object **************************/
@@ -375,6 +379,9 @@ getset_reg_u32(of);
 getset_reg_u32(cf);
 
 
+getset_reg_u32(exception_flags);
+getset_reg_u32(interrupt_num);
+
 
 PyObject* get_gpreg_offset_all(void)
 {
@@ -485,6 +492,9 @@ static PyGetSetDef JitCpu_getseters[] = {
     {"of", (getter)JitCpu_get_of, (setter)JitCpu_set_of, "of", NULL},
     {"cf", (getter)JitCpu_get_cf, (setter)JitCpu_set_cf, "cf", NULL},
 
+    {"exception_flags", (getter)JitCpu_get_exception_flags, (setter)JitCpu_set_exception_flags, "exception_flags", NULL},
+    {"interrupt_num", (getter)JitCpu_get_interrupt_num, (setter)JitCpu_set_interrupt_num, "interrupt_num", NULL},
+
     {NULL}  /* Sentinel */
 };
 
diff --git a/miasm2/jitter/arch/JitCore_aarch64.h b/miasm2/jitter/arch/JitCore_aarch64.h
index 4635b395..c7fc3cea 100644
--- a/miasm2/jitter/arch/JitCore_aarch64.h
+++ b/miasm2/jitter/arch/JitCore_aarch64.h
@@ -1,6 +1,7 @@
 
 typedef struct {
 	uint32_t exception_flags;
+	uint32_t interrupt_num;
 
 	/* gpregs */