1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18#ifndef __X86_EMU_H__
19#define __X86_EMU_H__
20
21#include "x86.h"
22#include "x86_decode.h"
23#include "cpu.h"
24
25void init_emu(void);
26bool exec_instruction(struct CPUX86State *env, struct x86_decode *ins);
27
28void load_regs(struct CPUState *cpu);
29void store_regs(struct CPUState *cpu);
30
31void simulate_rdmsr(struct CPUState *cpu);
32void simulate_wrmsr(struct CPUState *cpu);
33
34target_ulong read_reg(CPUX86State *env, int reg, int size);
35void write_reg(CPUX86State *env, int reg, target_ulong val, int size);
36target_ulong read_val_from_reg(target_ulong reg_ptr, int size);
37void write_val_to_reg(target_ulong reg_ptr, target_ulong val, int size);
38void write_val_ext(struct CPUX86State *env, target_ulong ptr, target_ulong val, int size);
39uint8_t *read_mmio(struct CPUX86State *env, target_ulong ptr, int bytes);
40target_ulong read_val_ext(struct CPUX86State *env, target_ulong ptr, int size);
41
42void exec_movzx(struct CPUX86State *env, struct x86_decode *decode);
43void exec_shl(struct CPUX86State *env, struct x86_decode *decode);
44void exec_movsx(struct CPUX86State *env, struct x86_decode *decode);
45void exec_ror(struct CPUX86State *env, struct x86_decode *decode);
46void exec_rol(struct CPUX86State *env, struct x86_decode *decode);
47void exec_rcl(struct CPUX86State *env, struct x86_decode *decode);
48void exec_rcr(struct CPUX86State *env, struct x86_decode *decode);
49#endif
50