From patchwork Mon Jan 13 17:42:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Machado X-Patchwork-Id: 182818 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp4505930ile; Mon, 13 Jan 2020 11:14:49 -0800 (PST) X-Google-Smtp-Source: APXvYqxInJ8u6oUDHn8YWkyNq7UmorGRtiTep8V65eiXGiDPm0X4zto0zQ2yEoa0SVtUUCw5zOw3 X-Received: by 2002:a9d:7d09:: with SMTP id v9mr14605414otn.338.1578937386437; Mon, 13 Jan 2020 09:43:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578937386; cv=none; d=google.com; s=arc-20160816; b=WmkPgCuhcWGoD9TP3m48mF8YxnSkXETy0a7DK26pomASjmuv3KoxG1UsJ5eDvl91hn qQkI1SNbscVWkX8DE+oqaQdE2X6nfRHh9Ij7Tj1u6Se/+J7xCE6uW6MZHkL+wpV8VecA JzfgSb0nuVJq67LAV9nBmNIpII6cmwOqqN5PBzl4Z3S8DPk3Lqo6+up7Au3Go4P60Yhg yIQYYVEHzT4xPa+WNTKatiG/Ok7VGaFcv5vRDuNGaqYnR8z29leqzaha3yk1mdTuXfCM 6wz01YK3asDXIPqiMjEsjLOVQRYTy+aZyUnrHm77uxaWV5l3Rt/ZXdqc2fGna/Pjt3S1 ChRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=9UIqipkxVJP64D45CBQkU0Uflh4z7kf0Zhssg5BebkQ=; b=g1d2z9CqMewQRs5eQUPs3xdl4Kj0SRSG2uHLCx39NG2+cMXzypCKNbgO4AO4R/Kyzt VUsGFZ2HXq4OQCu/4mry1BlaYrnJZfkQ21BJxwVlq0OBeP0edNK/hSvqlKHhSmPxUdEi JY0ftgby6ABgCyzUqb9MTE+tRFy9mW32n+vIWep81QFjOT88GcgMuGZ56Zsa+smGgTN9 7Z3PoSsuyrdEwW4u6+xqFgMgOJLq6ahEmoHXqKx3fs9703LwODLMAuWAYOfe4X62HBpf UmfpIGAtIy0fUt4aWnA3F6oWA3lamvdpjpBXcom9Hz4ggg5bF7avSHBPQJ9K7FSLL6Ry uIMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=d2xJrStY; dkim=pass header.i=@linaro.org header.s=google header.b=vkxgTPzt; spf=pass (google.com: domain of gdb-patches-return-163026-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gdb-patches-return-163026-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id s16si6446570oih.4.2020.01.13.09.43.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jan 2020 09:43:06 -0800 (PST) Received-SPF: pass (google.com: domain of gdb-patches-return-163026-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=d2xJrStY; dkim=pass header.i=@linaro.org header.s=google header.b=vkxgTPzt; spf=pass (google.com: domain of gdb-patches-return-163026-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gdb-patches-return-163026-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=u9jRWOO0H+SQ3b3Tt8wa6eCZTn5P4ad Joz5vyTcYLLVHAzG/9V5yXeiVZ6EHbda7yhGOnKGxlDwA/R4/c23xpK0pPTy450R IDK/Ak1kBKgkMKshyFRRU++FLoXk4f2yDmZg3J6MgRq/mQuk/bIpUDG6QSJnHZ1B kFaP8X/Y/eec= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=iDxIBiSWO9x//DBWE5PzfWYrhG4=; b=d2xJr StYkcAoyK8DEJ0fpArbkURZCunaMvBNtJNf9Y761sI/ud2K5d9Z56wpS/OPMtWIm f5SsgO4NITc1pEJ6ucsGJ/YxUOT3EaeFMVq1NjjDvWs19xu6M02lz6H4/F248d7D cidzjEQzuFfu5lZyd4M45zrnherqkzgAXdI9OM= Received: (qmail 33992 invoked by alias); 13 Jan 2020 17:42:53 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 33915 invoked by uid 89); 13 Jan 2020 17:42:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1791 X-HELO: mail-qk1-f174.google.com Received: from mail-qk1-f174.google.com (HELO mail-qk1-f174.google.com) (209.85.222.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 13 Jan 2020 17:42:51 +0000 Received: by mail-qk1-f174.google.com with SMTP id k6so9289764qki.5 for ; Mon, 13 Jan 2020 09:42:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9UIqipkxVJP64D45CBQkU0Uflh4z7kf0Zhssg5BebkQ=; b=vkxgTPzttC7R5jPQ6yS3dz5JHdkBHoZalwcgdvECjwX18N4Jdw1NL2h1sxAEVyvqfu 7VO0MaicZP/ywtMNEjbtw6eGtnkmMpAX6vJyzno0Ol0kIs/0RYZruaSV17u3Fh1nuKo8 x+JVA7iYBAnNGa95gNTocailyyQrrd2AnN99uPPn32uvwdnQRPeenRFNPpV+aWHTjxv/ IMGmUyhDDcNwYvCQ7AA34kXv78SfFiqcxqb0hvquDOU+eJ/yLAGYIRK+bBZInxhHsQ/X AsPiGgI8Knv0kst+eBI9GqYg+j9N271pV5xohsvdd9nMMFksl1vK55DulK+qhRE0/cO4 d6oA== Return-Path: Received: from localhost.localdomain ([179.183.9.215]) by smtp.gmail.com with ESMTPSA id s27sm5247049qkm.97.2020.01.13.09.42.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2020 09:42:49 -0800 (PST) From: Luis Machado To: gdb-patches@sourceware.org Cc: alan.hayward@arm.com Subject: [PATCH] [AArch64] Convert an int flag variable to bool Date: Mon, 13 Jan 2020 14:42:38 -0300 Message-Id: <20200113174239.7819-2-luis.machado@linaro.org> In-Reply-To: <20200113174239.7819-1-luis.machado@linaro.org> References: <20200113174239.7819-1-luis.machado@linaro.org> X-IsSubscribed: yes As suggested, the cond variable is really supposed to be a bool. So, make it so. gdb/ChangeLog: 2020-01-13 Luis Machado * aarch64-tdep.c (struct aarch64_displaced_step_closure) : Change type to bool. (aarch64_displaced_step_b_cond): Update cond to use bool type. (aarch64_displaced_step_cb): Likewise. (aarch64_displaced_step_tb): Likewise. --- gdb/aarch64-tdep.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index 29b712c155..02634b9c5c 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -2735,7 +2735,7 @@ struct aarch64_displaced_step_closure : public displaced_step_closure { /* It is true when condition instruction, such as B.CON, TBZ, etc, is being displaced stepping. */ - int cond = 0; + bool cond = false; /* PC adjustment offset after displaced stepping. If 0, then we don't write the PC back, assuming the PC is already the right address. */ @@ -2816,7 +2816,7 @@ aarch64_displaced_step_b_cond (const unsigned cond, const int32_t offset, */ emit_bcond (dsd->insn_buf, cond, 8); - dsd->dsc->cond = 1; + dsd->dsc->cond = true; dsd->dsc->pc_adjust = offset; dsd->insn_count = 1; } @@ -2851,7 +2851,7 @@ aarch64_displaced_step_cb (const int32_t offset, const int is_cbnz, */ emit_cb (dsd->insn_buf, is_cbnz, aarch64_register (rn, is64), 8); dsd->insn_count = 1; - dsd->dsc->cond = 1; + dsd->dsc->cond = true; dsd->dsc->pc_adjust = offset; } @@ -2876,7 +2876,7 @@ aarch64_displaced_step_tb (const int32_t offset, int is_tbnz, */ emit_tb (dsd->insn_buf, is_tbnz, bit, aarch64_register (rt, 1), 8); dsd->insn_count = 1; - dsd->dsc->cond = 1; + dsd->dsc->cond = true; dsd->dsc->pc_adjust = offset; }