Add const to uc_reg_write and derivitives
This commit is contained in:
4
qemu/target-arm/unicorn.h
Normal file → Executable file
4
qemu/target-arm/unicorn.h
Normal file → Executable file
@@ -6,9 +6,9 @@
|
||||
|
||||
// functions to read & write registers
|
||||
int arm_reg_read(uch handle, unsigned int regid, void *value);
|
||||
int arm_reg_write(uch handle, unsigned int regid, void *value);
|
||||
int arm_reg_write(uch handle, unsigned int regid, const void *value);
|
||||
int arm64_reg_read(uch handle, unsigned int regid, void *value);
|
||||
int arm64_reg_write(uch handle, unsigned int regid, void *value);
|
||||
int arm64_reg_write(uch handle, unsigned int regid, const void *value);
|
||||
|
||||
void arm_reg_reset(uch handle);
|
||||
void arm64_reg_reset(uch handle);
|
||||
|
||||
2
qemu/target-arm/unicorn_aarch64.c
Normal file → Executable file
2
qemu/target-arm/unicorn_aarch64.c
Normal file → Executable file
@@ -68,7 +68,7 @@ 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, void *value)
|
||||
int arm64_reg_write(uch handle, unsigned int regid, const void *value)
|
||||
{
|
||||
CPUState *mycpu;
|
||||
struct uc_struct *uc = (struct uc_struct *) handle;
|
||||
|
||||
2
qemu/target-arm/unicorn_arm.c
Normal file → Executable file
2
qemu/target-arm/unicorn_arm.c
Normal file → Executable file
@@ -78,7 +78,7 @@ int arm_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 arm_reg_write(uch handle, unsigned int regid, void *value)
|
||||
int arm_reg_write(uch handle, unsigned int regid, const void *value)
|
||||
{
|
||||
CPUState *mycpu;
|
||||
struct uc_struct *uc = (struct uc_struct *) handle;
|
||||
|
||||
2
qemu/target-i386/unicorn.c
Normal file → Executable file
2
qemu/target-i386/unicorn.c
Normal file → Executable file
@@ -536,7 +536,7 @@ int x86_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 x86_reg_write(uch handle, unsigned int regid, void *value)
|
||||
int x86_reg_write(uch handle, unsigned int regid, const void *value)
|
||||
{
|
||||
CPUState *mycpu;
|
||||
struct uc_struct *uc = (struct uc_struct *) handle;
|
||||
|
||||
2
qemu/target-i386/unicorn.h
Normal file → Executable file
2
qemu/target-i386/unicorn.h
Normal file → Executable file
@@ -6,7 +6,7 @@
|
||||
|
||||
// functions to read & write registers
|
||||
int x86_reg_read(uch handle, unsigned int regid, void *value);
|
||||
int x86_reg_write(uch handle, unsigned int regid, void *value);
|
||||
int x86_reg_write(uch handle, unsigned int regid, const void *value);
|
||||
|
||||
void x86_reg_reset(uch handle);
|
||||
|
||||
|
||||
2
qemu/target-m68k/unicorn.c
Normal file → Executable file
2
qemu/target-m68k/unicorn.c
Normal file → Executable file
@@ -60,7 +60,7 @@ int m68k_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 m68k_reg_write(uch handle, unsigned int regid, void *value)
|
||||
int m68k_reg_write(uch handle, unsigned int regid, const void *value)
|
||||
{
|
||||
struct uc_struct *uc = (struct uc_struct *) handle;
|
||||
CPUState *mycpu = first_cpu;
|
||||
|
||||
2
qemu/target-m68k/unicorn.h
Normal file → Executable file
2
qemu/target-m68k/unicorn.h
Normal file → Executable file
@@ -6,7 +6,7 @@
|
||||
|
||||
// functions to read & write registers
|
||||
int m68k_reg_read(uch handle, unsigned int regid, void *value);
|
||||
int m68k_reg_write(uch handle, unsigned int regid, void *value);
|
||||
int m68k_reg_write(uch handle, unsigned int regid, const void *value);
|
||||
|
||||
void m68k_reg_reset(uch handle);
|
||||
|
||||
|
||||
2
qemu/target-mips/unicorn.c
Normal file → Executable file
2
qemu/target-mips/unicorn.c
Normal file → Executable file
@@ -57,7 +57,7 @@ int mips_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 mips_reg_write(uch handle, unsigned int regid, void *value)
|
||||
int mips_reg_write(uch handle, unsigned int regid, const void *value)
|
||||
{
|
||||
struct uc_struct *uc = (struct uc_struct *) handle;
|
||||
CPUState *mycpu = first_cpu;
|
||||
|
||||
2
qemu/target-mips/unicorn.h
Normal file → Executable file
2
qemu/target-mips/unicorn.h
Normal file → Executable file
@@ -6,7 +6,7 @@
|
||||
|
||||
// functions to read & write registers
|
||||
int mips_reg_read(uch handle, unsigned int regid, void *value);
|
||||
int mips_reg_write(uch handle, unsigned int regid, void *value);
|
||||
int mips_reg_write(uch handle, unsigned int regid, const void *value);
|
||||
|
||||
void mips_reg_reset(uch handle);
|
||||
|
||||
|
||||
2
qemu/target-sparc/unicorn.c
Normal file → Executable file
2
qemu/target-sparc/unicorn.c
Normal file → Executable file
@@ -71,7 +71,7 @@ int sparc_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 sparc_reg_write(uch handle, unsigned int regid, void *value)
|
||||
int sparc_reg_write(uch handle, unsigned int regid, const void *value)
|
||||
{
|
||||
struct uc_struct *uc = (struct uc_struct *) handle;
|
||||
CPUState *mycpu = first_cpu;
|
||||
|
||||
2
qemu/target-sparc/unicorn.h
Normal file → Executable file
2
qemu/target-sparc/unicorn.h
Normal file → Executable file
@@ -6,7 +6,7 @@
|
||||
|
||||
// functions to read & write registers
|
||||
int sparc_reg_read(uch handle, unsigned int regid, void *value);
|
||||
int sparc_reg_write(uch handle, unsigned int regid, void *value);
|
||||
int sparc_reg_write(uch handle, unsigned int regid, const void *value);
|
||||
|
||||
void sparc_reg_reset(uch handle);
|
||||
|
||||
|
||||
2
qemu/target-sparc/unicorn64.c
Normal file → Executable file
2
qemu/target-sparc/unicorn64.c
Normal file → Executable file
@@ -54,7 +54,7 @@ int sparc_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 sparc_reg_write(uch handle, unsigned int regid, void *value)
|
||||
int sparc_reg_write(uch handle, unsigned int regid, const void *value)
|
||||
{
|
||||
struct uc_struct *uc = (struct uc_struct *) handle;
|
||||
CPUState *mycpu = first_cpu;
|
||||
|
||||
Reference in New Issue
Block a user