Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751464AbbL1HIG (ORCPT ); Mon, 28 Dec 2015 02:08:06 -0500 Received: from mail-pf0-f173.google.com ([209.85.192.173]:34698 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751085AbbL1HID (ORCPT ); Mon, 28 Dec 2015 02:08:03 -0500 From: yalin wang To: linux@arm.linux.org.uk, tixy@linaro.org, wangnan0@huawei.com, masami.hiramatsu.pt@hitachi.com, yalin.wang2010@gmail.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RFC] arm: change to use generic sign_extend32() function Date: Mon, 28 Dec 2015 15:07:35 +0800 Message-Id: <1451286455-13121-1-git-send-email-yalin.wang2010@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1127 Lines: 35 change to use generic sign_extend32() to caaculate branch_displacement. Signed-off-by: yalin wang --- arch/arm/probes/decode-arm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/probes/decode-arm.c b/arch/arm/probes/decode-arm.c index f72c33a..ff794c0 100644 --- a/arch/arm/probes/decode-arm.c +++ b/arch/arm/probes/decode-arm.c @@ -20,13 +20,12 @@ #include #include #include +#include #include "decode.h" #include "decode-arm.h" -#define sign_extend(x, signbit) ((x) | (0 - ((x) & (1 << (signbit))))) - -#define branch_displacement(insn) sign_extend(((insn) & 0xffffff) << 2, 25) +#define branch_displacement(insn) sign_extend32(((insn) & 0xffffff) << 2, 25) /* * To avoid the complications of mimicing single-stepping on a -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/