From patchwork Wed May 16 18:51:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 10404687 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3936E601C8 for ; Wed, 16 May 2018 18:58:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27AAB285DB for ; Wed, 16 May 2018 18:58:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B78D2860C; Wed, 16 May 2018 18:58:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, FSL_HELO_FAKE, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7D436285DB for ; Wed, 16 May 2018 18:58:40 +0000 (UTC) Received: from localhost ([::1]:34199 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJ1dH-0000Az-8W for patchwork-qemu-devel@patchwork.kernel.org; Wed, 16 May 2018 14:58:39 -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) 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) 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) 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 = NULL; - unsigned int size, rev = 0, ex = 0; + unsigned int size; + bool rev = false, ex = false; TCGMemOp mop; mop = dc->opcode & 3; size = 1 << mop; if (!dc->type_b) { - rev = (dc->ir >> 9) & 1; - ex = (dc->ir >> 10) & 1; + rev = extract32(dc->ir, 9, 1); + ex = extract32(dc->ir, 10, 1); } mop |= MO_TE; if (rev) {