From nobody Sat Nov 1 07:48:35 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 152649715876850.11782308000943; Wed, 16 May 2018 11:59:18 -0700 (PDT) Received: from localhost ([::1]:34199 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJ1dp-0000Az-3q for importer@patchew.org; Wed, 16 May 2018 14:59:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJ1Wj-0002q5-Vo for qemu-devel@nongnu.org; Wed, 16 May 2018 14:51:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJ1Wj-0000fT-6z for qemu-devel@nongnu.org; Wed, 16 May 2018 14:51:54 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:35408) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fJ1Wj-0000fO-1A for qemu-devel@nongnu.org; Wed, 16 May 2018 14:51:53 -0400 Received: by mail-wm0-x242.google.com with SMTP id o78-v6so4301524wmg.0 for ; Wed, 16 May 2018 11:51:52 -0700 (PDT) Received: from gmail.com (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id q68-v6sm773921lfq.58.2018.05.16.11.51.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 May 2018 11:51:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7ATpslQKWd63w3UD7NML8p8c0FLP9bLh9tRI+SfFzVk=; b=dzM/0Be0d66BnVJuIC6rPR10MYzIZ3mD58KdE/88McRluWtvaON92DSuWbJrbqqzxM fRQRTapOLIRQah/tzMF7jXh262XO4gnHiuybe4TnNxnKc+4/41CEYs4rrPUfoLLJJOXF /hGhu2XwPna4Co6emCGpVXRvPhE5mVPihg+BHx6wo7odUQO49MAQnKPonfe/qxPd7U0f l+Nl4P8iMik6LxhhwCvi6kZdui2ZH78fkWWGes9RKqpCUFxqdVBU9SpeG0CHe0kto58+ SwltFUPwUQBO11Dqg7cT2yuKimIH+Tpp8h8+29x59ulzIxYltfHPHTJq/BxDyc462BcZ Dmlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7ATpslQKWd63w3UD7NML8p8c0FLP9bLh9tRI+SfFzVk=; b=V76w889UgAmoed21QzI+gxtbnOSUNWbzrhQf0FoDEwu8x/voB7UdDJzq4mdopXSxgi nj6yUSO7SBsT7x5o7HMED8aAoLiiSaNM4LMn0hkhYiYk12UO2dV+LKfiOaR5RLtCVasV yC/ajN5VQopIItbGyTTKeVE2ad3GmFqVC9H10hVIuqbxxTlcFo005gP7Z64tYAHRHd3C n9P3bT1/DH6RqnUykjEAgEhdlg0S9nRoMK68pp843hXXjDmf/enhuBg3/gq2SO8DhfFv ZvT2uTSmse0MIdRwJHIBY2G8w8QXJYOi3uwqp617xOrSB0PnAfACz4OlV5DrdFxSsLMK gTxQ== X-Gm-Message-State: ALKqPwevzrH/u1fFUkQCIzUg1J8CSyGvbwML12gHb32d+AF5BKIHM2Ga 0s2J0hl7cXqSxcAHrH8h8GMujw== X-Google-Smtp-Source: AB8JxZpGrWprxYQQDIwjmtXcaZyRAYOaUvh6j9TtDTtu603terV6wWxVRFWwjtvS4n96GkjqLxXjAg== X-Received: by 2002:a2e:9c08:: with SMTP id s8-v6mr1235305lji.97.1526496711557; Wed, 16 May 2018 11:51:51 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Wed, 16 May 2018 20:51:10 +0200 Message-Id: <20180516185146.30708-3-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180516185146.30708-1-edgar.iglesias@gmail.com> References: <20180516185146.30708-1-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PATCH v3 02/38] target-microblaze: dec_store: Use bool instead of unsigned int X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org, sstabellini@kernel.org, sai.pavan.boddu@xilinx.com, frasse.iglesias@gmail.com, alistair@alistair23.me, richard.henderson@linaro.org, frederic.konrad@adacore.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Edgar E. Iglesias" Use bool instead of unsigned int to represent flags. Also, use extract32 instead of open coding the bit extract. No functional change. Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Edgar E. Iglesias --- target/microblaze/translate.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index a8a5eaebec..413e683aec 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -1027,14 +1027,15 @@ static void dec_store(DisasContext *dc) { TCGv t, *addr, swx_addr; TCGLabel *swx_skip =3D NULL; - unsigned int size, rev =3D 0, ex =3D 0; + unsigned int size; + bool rev =3D false, ex =3D false; TCGMemOp mop; =20 mop =3D dc->opcode & 3; size =3D 1 << mop; if (!dc->type_b) { - rev =3D (dc->ir >> 9) & 1; - ex =3D (dc->ir >> 10) & 1; + rev =3D extract32(dc->ir, 9, 1); + ex =3D extract32(dc->ir, 10, 1); } mop |=3D MO_TE; if (rev) { --=20 2.14.1