diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-09-11 07:20:22 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-09-11 07:20:47 +0200 |
| commit | deb20acf06374cec650188d55e6a4239007eb086 (patch) | |
| tree | ab621dce8518980d1e5bae5d861a060f98160e9f /miasm2/arch/x86/sem.py | |
| parent | 9358bf5ad2113fb2d1c8c11e3da59fe8c0c1be13 (diff) | |
| download | miasm-deb20acf06374cec650188d55e6a4239007eb086.tar.gz miasm-deb20acf06374cec650188d55e6a4239007eb086.zip | |
X86: rdmsr/wrmsr priv instr
RDMSR/WRMSR where modelised as load/store from special symbolic value. This behavior is not compatible with jit. If someone needs another model, fix mnemo_func.
Diffstat (limited to '')
| -rw-r--r-- | miasm2/arch/x86/sem.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index f87c42cf..f07e2285 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -3681,18 +3681,12 @@ def xorps(_, instr, dst, src): def rdmsr(ir, instr): - msr_addr = m2_expr.ExprId('MSR', 64) + m2_expr.ExprInt(8, 64) * mRCX[32].zeroExtend(64) - e = [] - e.append(m2_expr.ExprAff(mRAX[32], ir.ExprMem(msr_addr, 32))) - e.append(m2_expr.ExprAff(mRDX[32], ir.ExprMem(msr_addr + m2_expr.ExprInt(4, 64), 32))) + e = [m2_expr.ExprAff(exception_flags,m2_expr.ExprInt(EXCEPT_PRIV_INSN, 32))] return e, [] def wrmsr(ir, instr): - msr_addr = m2_expr.ExprId('MSR', 64) + m2_expr.ExprInt(8, 64) * mRCX[32].zeroExtend(64) - e = [] - src = m2_expr.ExprCompose(mRAX[32], mRDX[32]) - e.append(m2_expr.ExprAff(ir.ExprMem(msr_addr, 64), src)) + e = [m2_expr.ExprAff(exception_flags,m2_expr.ExprInt(EXCEPT_PRIV_INSN, 32))] return e, [] # MMX/SSE/AVX operations |