From 0f9ef1559d666290cb7b4520ec3fb9fdf437e5e2 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Sat, 27 Dec 2014 16:16:12 +0800 Subject: [PATCH] arm: BL & BLX do not read SP, but PC register. issue reported by Der Rek --- arch/ARM/ARMMapping.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/ARM/ARMMapping.c b/arch/ARM/ARMMapping.c index e9cd4b1f..f223e874 100644 --- a/arch/ARM/ARMMapping.c +++ b/arch/ARM/ARMMapping.c @@ -422,19 +422,19 @@ static insn_map insns[] = { { ARM_BL, ARM_INS_BL, #ifndef CAPSTONE_DIET - { ARM_REG_SP, 0 }, { ARM_REG_LR, 0 }, { ARM_GRP_JUMP, ARM_GRP_ARM, 0 }, 0, 0 + { ARM_REG_PC, 0 }, { ARM_REG_LR, 0 }, { ARM_GRP_JUMP, ARM_GRP_ARM, 0 }, 0, 0 #endif }, { ARM_BLX, ARM_INS_BLX, #ifndef CAPSTONE_DIET - { ARM_REG_SP, 0 }, { ARM_REG_LR, 0 }, { ARM_GRP_JUMP, ARM_GRP_ARM, ARM_GRP_V5T, 0 }, 0, 0 + { ARM_REG_PC, 0 }, { ARM_REG_LR, 0 }, { ARM_GRP_JUMP, ARM_GRP_ARM, ARM_GRP_V5T, 0 }, 0, 0 #endif }, { ARM_BLX_pred, ARM_INS_BLX, #ifndef CAPSTONE_DIET - { ARM_REG_SP, 0 }, { ARM_REG_LR, 0 }, { ARM_GRP_JUMP, ARM_GRP_ARM, ARM_GRP_V5T, 0 }, 0, 0 + { ARM_REG_PC, 0 }, { ARM_REG_LR, 0 }, { ARM_GRP_JUMP, ARM_GRP_ARM, ARM_GRP_V5T, 0 }, 0, 0 #endif }, { @@ -446,7 +446,7 @@ static insn_map insns[] = { { ARM_BL_pred, ARM_INS_BL, #ifndef CAPSTONE_DIET - { ARM_REG_SP, 0 }, { ARM_REG_LR, 0 }, { ARM_GRP_JUMP, ARM_GRP_ARM, 0 }, 0, 0 + { ARM_REG_PC, 0 }, { ARM_REG_LR, 0 }, { ARM_GRP_JUMP, ARM_GRP_ARM, 0 }, 0, 0 #endif }, {