diff options
author | Matt Hunter <m@lfurio.us> | 2025-08-16 05:54:18 -0400 |
---|---|---|
committer | Matt Hunter <m@lfurio.us> | 2025-09-07 06:41:16 -0400 |
commit | f9c7b14383a99ecc0a1e8266467804647acfaa3e (patch) | |
tree | d8899b9f57cc7deff5d07db3ed568e9d47bca220 | |
parent | 3b03d95a22a99df7d84647179a86f8c7f534868a (diff) | |
download | misplays-f9c7b14383a99ecc0a1e8266467804647acfaa3e.tar.gz misplays-f9c7b14383a99ecc0a1e8266467804647acfaa3e.zip |
Add 32-bit ARM architecture params
Signed-off-by: Matt Hunter <m@lfurio.us>
-rw-r--r-- | architecture.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/architecture.h b/architecture.h index af98ce3..a433cfd 100644 --- a/architecture.h +++ b/architecture.h @@ -55,7 +55,7 @@ typedef union { #define CAPSTONE_CALL_32 X86_INS_CALL #define WORDSIZE_32 4 -#elif defined(__aarch64__) || defined(_M_ARM64) +#elif defined(__aarch64__) || defined(_M_ARM64) || defined(__arm__) typedef union { struct user_regs_64 { @@ -64,10 +64,13 @@ typedef union { } arm64; struct user_regs_32 { - unsigned int x; + unsigned int regs[18]; + //unsigned int regs[14]; + //unsigned int sp, pc, p0, vr; } arm32; } user_regs_t; +/* todo - rename this arch constant */ #define ARCH_AARCH64 #define PROGMCTR_64 arm64.pc @@ -80,14 +83,14 @@ typedef union { #define CAPSTONE_CALL_64 ARM64_INS_BL #define WORDSIZE_64 8 -#define PROGMCTR_32 arm32.x -#define STACKPTR_32 arm32.x -#define BREAKPOINT_INSN_32 0 -#define BREAKPOINT_MASK_32 0 -#define BREAKPOINT_ADJS_32 0 -#define CAPSTONE_ARCH_32 0 -#define CAPSTONE_MODE_32 0 -#define CAPSTONE_CALL_32 0 +#define PROGMCTR_32 arm32.regs[15] +#define STACKPTR_32 arm32.regs[13] +#define BREAKPOINT_INSN_32 0xe7f001f0ul +#define BREAKPOINT_MASK_32 0xfffffffful +#define BREAKPOINT_ADJS_32 0x0 +#define CAPSTONE_ARCH_32 CS_ARCH_ARM +#define CAPSTONE_MODE_32 CS_MODE_ARM +#define CAPSTONE_CALL_32 ARM_INS_BL #define WORDSIZE_32 4 #else |