diff options
| author | Ajax <commial@gmail.com> | 2017-04-06 16:23:55 +0200 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2017-04-18 16:09:05 +0200 |
| commit | dd102a77d2c2eadbbc3f9fa2236a90bf9e22ec5f (patch) | |
| tree | 9b04fd6454a48a091dfe3ace8ef54c4a8d17ccaa | |
| parent | ab619c80e3deb7088700e465ec62f917fd18150a (diff) | |
| download | miasm-dd102a77d2c2eadbbc3f9fa2236a90bf9e22ec5f.tar.gz miasm-dd102a77d2c2eadbbc3f9fa2236a90bf9e22ec5f.zip | |
Introduce attrib_to_regs: map attrib to corresponding registers
| -rw-r--r-- | miasm2/arch/aarch64/regs.py | 5 | ||||
| -rw-r--r-- | miasm2/arch/arm/regs.py | 5 | ||||
| -rw-r--r-- | miasm2/arch/mips32/regs.py | 5 | ||||
| -rw-r--r-- | miasm2/arch/msp430/regs.py | 5 | ||||
| -rw-r--r-- | miasm2/arch/x86/regs.py | 6 |
5 files changed, 26 insertions, 0 deletions
diff --git a/miasm2/arch/aarch64/regs.py b/miasm2/arch/aarch64/regs.py index 01ae4252..4589c17a 100644 --- a/miasm2/arch/aarch64/regs.py +++ b/miasm2/arch/aarch64/regs.py @@ -97,6 +97,11 @@ all_regs_ids = [ all_regs_ids_no_alias = all_regs_ids +attrib_to_regs = { + 'l': all_regs_ids_no_alias, + 'b': all_regs_ids_no_alias, +} + all_regs_ids_byname = dict([(x.name, x) for x in all_regs_ids]) all_regs_ids_init = (simd08_init + diff --git a/miasm2/arch/arm/regs.py b/miasm2/arch/arm/regs.py index 69488cb5..400c6080 100644 --- a/miasm2/arch/arm/regs.py +++ b/miasm2/arch/arm/regs.py @@ -71,6 +71,11 @@ all_regs_ids = [ all_regs_ids_no_alias = all_regs_ids +attrib_to_regs = { + 'l': all_regs_ids_no_alias, + 'b': all_regs_ids_no_alias, +} + all_regs_ids_byname = dict([(x.name, x) for x in all_regs_ids]) all_regs_ids_init = [R0_init, R1_init, R2_init, R3_init, diff --git a/miasm2/arch/mips32/regs.py b/miasm2/arch/mips32/regs.py index 974d3a2b..fbd55a46 100644 --- a/miasm2/arch/mips32/regs.py +++ b/miasm2/arch/mips32/regs.py @@ -62,6 +62,11 @@ all_regs_ids_init = [PC_init, PC_FETCH_init, R_LO_init, R_HI_init] + \ gpregs_init + regs_flt_init + regs_fcc_init + regs_cpr0_init all_regs_ids_no_alias = all_regs_ids[:] +attrib_to_regs = { + 'l': all_regs_ids_no_alias, + 'b': all_regs_ids_no_alias, +} + regs_init = {} for i, r in enumerate(all_regs_ids): regs_init[r] = all_regs_ids_init[i] diff --git a/miasm2/arch/msp430/regs.py b/miasm2/arch/msp430/regs.py index 1e35029f..11385779 100644 --- a/miasm2/arch/msp430/regs.py +++ b/miasm2/arch/msp430/regs.py @@ -92,6 +92,11 @@ all_regs_ids = [ all_regs_ids_no_alias = all_regs_ids +attrib_to_regs = { + 'l': all_regs_ids_no_alias, + 'b': all_regs_ids_no_alias, +} + all_regs_ids_byname = dict([(x.name, x) for x in all_regs_ids]) all_regs_ids_init = [PC_init, SP_init, SR_init, R3_init, diff --git a/miasm2/arch/x86/regs.py b/miasm2/arch/x86/regs.py index 34585dae..7354457f 100644 --- a/miasm2/arch/x86/regs.py +++ b/miasm2/arch/x86/regs.py @@ -424,6 +424,12 @@ all_regs_ids_no_alias = [ exception_flags, interrupt_num, ] + fltregs32_expr +attrib_to_regs = { + 16: regs16_expr + all_regs_ids_no_alias[all_regs_ids_no_alias.index(zf):], + 32: regs32_expr + all_regs_ids_no_alias[all_regs_ids_no_alias.index(zf):], + 64: all_regs_ids_no_alias, +} + all_regs_ids_byname = dict([(x.name, x) for x in all_regs_ids]) all_regs_ids_init = [ExprId("%s_init" % x.name, x.size) for x in all_regs_ids] |