Format code
This commit is contained in:
@@ -93,7 +93,7 @@ typedef void (*uc_args_uc_long_t)(struct uc_struct *, unsigned long);
|
|||||||
|
|
||||||
typedef void (*uc_args_uc_u64_t)(struct uc_struct *, uint64_t addr);
|
typedef void (*uc_args_uc_u64_t)(struct uc_struct *, uint64_t addr);
|
||||||
|
|
||||||
typedef uint64_t (*uc_get_pc_t)(struct uc_struct*);
|
typedef uint64_t (*uc_get_pc_t)(struct uc_struct *);
|
||||||
|
|
||||||
typedef MemoryRegion *(*uc_args_uc_ram_size_t)(struct uc_struct *, hwaddr begin,
|
typedef MemoryRegion *(*uc_args_uc_ram_size_t)(struct uc_struct *, hwaddr begin,
|
||||||
size_t size, uint32_t perms);
|
size_t size, uint32_t perms);
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ static void arm_set_pc(struct uc_struct *uc, uint64_t address)
|
|||||||
|
|
||||||
static uint64_t arm_get_pc(struct uc_struct *uc)
|
static uint64_t arm_get_pc(struct uc_struct *uc)
|
||||||
{
|
{
|
||||||
return ((CPUARMState *)uc->cpu->env_ptr)->regs[15] | ((CPUARMState *)uc->cpu->env_ptr)->thumb;
|
return ((CPUARMState *)uc->cpu->env_ptr)->regs[15] |
|
||||||
|
((CPUARMState *)uc->cpu->env_ptr)->thumb;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void arm_release(void *ctx)
|
static void arm_release(void *ctx)
|
||||||
|
|||||||
@@ -33,10 +33,11 @@ static void x86_set_pc(struct uc_struct *uc, uint64_t address)
|
|||||||
((CPUX86State *)uc->cpu->env_ptr)->eip = address;
|
((CPUX86State *)uc->cpu->env_ptr)->eip = address;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint64_t x86_get_pc(struct uc_struct *uc)
|
static uint64_t x86_get_pc(struct uc_struct *uc)
|
||||||
{
|
{
|
||||||
if (uc->mode == UC_MODE_16) {
|
if (uc->mode == UC_MODE_16) {
|
||||||
return X86_CPU(uc->cpu)->env.segs[R_CS].selector * 16 + ((CPUX86State *)uc->cpu->env_ptr)->eip;
|
return X86_CPU(uc->cpu)->env.segs[R_CS].selector * 16 +
|
||||||
|
((CPUX86State *)uc->cpu->env_ptr)->eip;
|
||||||
} else {
|
} else {
|
||||||
return ((CPUX86State *)uc->cpu->env_ptr)->eip;
|
return ((CPUX86State *)uc->cpu->env_ptr)->eip;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ static uint64_t tricore_get_pc(struct uc_struct *uc)
|
|||||||
return ((CPUTriCoreState *)uc->cpu->env_ptr)->PC;
|
return ((CPUTriCoreState *)uc->cpu->env_ptr)->PC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void tricore_reg_reset(struct uc_struct *uc)
|
void tricore_reg_reset(struct uc_struct *uc)
|
||||||
{
|
{
|
||||||
CPUTriCoreState *env;
|
CPUTriCoreState *env;
|
||||||
|
|||||||
Reference in New Issue
Block a user