change uch to uc_struct (target-arm)
This commit is contained in:
@@ -25,23 +25,17 @@ static void arm64_set_pc(struct uc_struct *uc, uint64_t address)
|
||||
((CPUARMState *)uc->current_cpu->env_ptr)->pc = address;
|
||||
}
|
||||
|
||||
void arm64_reg_reset(uch handle)
|
||||
void arm64_reg_reset(struct uc_struct *uc)
|
||||
{
|
||||
struct uc_struct *uc = (struct uc_struct *) handle;
|
||||
CPUArchState *env;
|
||||
|
||||
env = first_cpu->env_ptr;
|
||||
CPUArchState *env = first_cpu->env_ptr;
|
||||
memset(env->xregs, 0, sizeof(env->xregs));
|
||||
|
||||
env->pc = 0;
|
||||
}
|
||||
|
||||
int arm64_reg_read(uch handle, unsigned int regid, void *value)
|
||||
int arm64_reg_read(struct uc_struct *uc, unsigned int regid, void *value)
|
||||
{
|
||||
CPUState *mycpu;
|
||||
struct uc_struct *uc = (struct uc_struct *) handle;
|
||||
|
||||
mycpu = first_cpu;
|
||||
CPUState *mycpu = first_cpu;
|
||||
|
||||
if (regid >= UC_ARM64_REG_X0 && regid <= UC_ARM64_REG_X28)
|
||||
*(int64_t *)value = ARM_CPU(uc, mycpu)->env.xregs[regid - UC_ARM64_REG_X0];
|
||||
@@ -68,12 +62,9 @@ int arm64_reg_read(uch handle, unsigned int regid, void *value)
|
||||
#define WRITE_BYTE_H(x, b) (x = (x & ~0xff00) | (b & 0xff))
|
||||
#define WRITE_BYTE_L(x, b) (x = (x & ~0xff) | (b & 0xff))
|
||||
|
||||
int arm64_reg_write(uch handle, unsigned int regid, const void *value)
|
||||
int arm64_reg_write(struct uc_struct *uc, unsigned int regid, const void *value)
|
||||
{
|
||||
CPUState *mycpu;
|
||||
struct uc_struct *uc = (struct uc_struct *) handle;
|
||||
|
||||
mycpu = first_cpu;
|
||||
CPUState *mycpu = first_cpu;
|
||||
|
||||
if (regid >= UC_ARM64_REG_X0 && regid <= UC_ARM64_REG_X28)
|
||||
ARM_CPU(uc, mycpu)->env.xregs[regid - UC_ARM64_REG_X0] = *(int64_t *)value;
|
||||
|
||||
Reference in New Issue
Block a user