From patchwork Tue May 29 10:49:35 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: 10434923 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 A2ACD601E9 for ; Tue, 29 May 2018 10:52:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9169B286C0 for ; Tue, 29 May 2018 10:52:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81DDD286C6; Tue, 29 May 2018 10:52:54 +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=-3.8 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 0152D286C0 for ; Tue, 29 May 2018 10:52:54 +0000 (UTC) Received: from localhost ([::1]:60090 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNcFJ-0002Sk-4X for patchwork-qemu-devel@patchwork.kernel.org; Tue, 29 May 2018 06:52:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNcCq-00019z-EM for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNcCp-0003jO-19 for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:20 -0400 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:39938) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNcCo-0003i4-Q1 for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:18 -0400 Received: by mail-wm0-x235.google.com with SMTP id x2-v6so31856289wmh.5 for ; Tue, 29 May 2018 03:50:18 -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=WH01lu6UMY0UacQQhnwulE+WbAyOdq1x/0QVwlEvmXSWbpZOFV1SevhpHZaf0uV3a9 9GsKvAPO3XLWoMZmU/O80XwHXbNX0p3V+y7WL//erdR0On2mYh8Wo2ZmIe9MmKHe6OEc +5M2b4CApSOPL+GNZ4Vf93AxkgW3JtlCBYWIFUL73JTPBziWy1vepri0R7ktfvS7y/WC EXxd9Y+gP1YMIR57RtpPGFLt7k4LmSaPqmzhMPDLwo/X8VtIX9GVpoKGysrQA/sswM/u uZ7OU4iqaOhvfYDPy50AesDaNsxhus3H+tivLS8cqmQjHVkKw8EIEkb/CWetj/j/fm8a DXiQ== 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=DqNDIGKWyp3JEaNOSljnXGKw+rtTJ8linetwGL95lqu4al0lJCdXH5BaKEJpKscsh/ IX2gHJ40oG60l9bQomIVffEH92DMvL4fk7HOyEP1bLErl2D44RzRUCVRbKZrVzA0GFEO 3ylv7O66o/pegzmAdUYIv/ITXNUmH1m+CRwXBZPEsIP5AoOLYT2l7+ycpcEsLByU4CYo peRjXtSzfFLHJ3jB9wisoDcHojZ+cwBs5fDxi8pv1IXoLIew4OmDlGi3oVVxTN1fejBR 5i2IHuHRqNQ1QGt2E3BAOKTdHRu2e0IvnbKMXvghxT80O6QykEjjrwKGANwpH2opiNaT E/YA== X-Gm-Message-State: ALKqPwcbRNXNu2QBbPfjPNoWV1JBqepDVBSZdIB4JHvyr2WQm4FK5Tap 0/D1CCdpLP8bN3jy2gUzK0Igww== X-Google-Smtp-Source: AB8JxZqWBtpgDIx+bXeZU4jUIpSWVJ5+UkeS84lXb4Yg7+9aKxqr135yl41zX7M5CE+XCmTtK/RioQ== X-Received: by 2002:a2e:997:: with SMTP id 145-v6mr10620965ljj.46.1527591016675; Tue, 29 May 2018 03:50:16 -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 c6-v6sm6365977lja.22.2018.05.29.03.50.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 03:50:15 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 29 May 2018 12:49:35 +0200 Message-Id: <20180529105011.1914-3-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180529105011.1914-1-edgar.iglesias@gmail.com> References: <20180529105011.1914-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::235 Subject: [Qemu-devel] [PULL v1 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 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) {