Message ID | 20180529105011.1914-18-edgar.iglesias@gmail.com |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="CvDhQHmz"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40w9dv063wz9ry1 for <incoming@patchwork.ozlabs.org>; Tue, 29 May 2018 20:56:51 +1000 (AEST) Received: from localhost ([::1]:60114 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1fNcJ6-00060z-Gl for incoming@patchwork.ozlabs.org; Tue, 29 May 2018 06:56:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <edgar.iglesias@gmail.com>) id 1fNcDD-0001WD-JS for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <edgar.iglesias@gmail.com>) id 1fNcDC-000416-Nv for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:43 -0400 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:39229) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <edgar.iglesias@gmail.com>) id 1fNcDC-00040K-Gd for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:42 -0400 Received: by mail-wm0-x233.google.com with SMTP id f8-v6so39341022wmc.4 for <qemu-devel@nongnu.org>; Tue, 29 May 2018 03:50:42 -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=haPNN6ycLEghWOSBgf9fgUxJqsAV1VssmBsi2JT1vUo=; b=CvDhQHmzb6kVRL3JuACjXOtBNBQBub9Kx4V6SX9FgwUNIE+mWKrFSe5jewNvx7bJpv 3FvH4oJIWi2g9V4StE/rsNQS/InkWu46QLQ1GWS8ImjNfZquWYJsxi1cAQG52fq+abKC Ypqinzg223bZqcTcg+UsUWa+jX91DoqQHE8lqvScpE3JjLShAE/joRVYEX6wKmax+rMG 6KJ6t70W9/VpZ2tJyePHKq9hLHXB9Lw3wksxZqmC8G+5kze5Oio+HWWY1PpGRWPmzKOG Q3PYRV2A/EBSePssyV2I91VKhZW2yyr/oOZd7Xj68c8oJHqne95FeTdwipLKzrdO8duV cdgQ== 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=haPNN6ycLEghWOSBgf9fgUxJqsAV1VssmBsi2JT1vUo=; b=k4JzP2BzYfSGEAkYxhuGTBgOGVrDGW+0dhSzD8xKdN73Xkmj9n6k7y1dvu3kolaex6 lZt/hrOP6blYYGSb/dw4yH7nySiSNgGeM+QWXD8x3nzFAI3ynH6uDfExo6jvWnGmUv4r QrgrpGQdMSUd4vQz8Cs7T9HoQQHzlJ0P9Vuyly7jHNKmPRQF/Yv73FKrOskdjSf3NlJy uBRc6EDO8ld10Q4OTMvQFD4O/uFehpuKoZiiRyIWAyPZr+U34lHz6cuKX0co0RIEEvVg MX0Dx93+I/wobin7sSNZ1VETDTs6v6K5Nrnfiy4D616o4k8j4zgjpfr6hvwGef7xnRes EGPA== X-Gm-Message-State: ALKqPwdWCnUyIoWHIhlYFcmYVlA+BJfCO6uEhCM9IlcBRtEjsU86loxP kO93MPx/rwsX38D7MGGlEoHfVQ== X-Google-Smtp-Source: AB8JxZoBjCR2BGcFDsBnXd0EGplEnNOVNNV5IYn9Eec4MNT5y2GaMNe0q07Rvveio5vib1Lqyb5GnQ== X-Received: by 2002:a2e:42d2:: with SMTP id h79-v6mr10769785ljf.26.1527591041118; Tue, 29 May 2018 03:50:41 -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 66-v6sm513563ljz.28.2018.05.29.03.50.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 03:50:40 -0700 (PDT) From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com> To: qemu-devel@nongnu.org Date: Tue, 29 May 2018 12:49:50 +0200 Message-Id: <20180529105011.1914-18-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::233 Subject: [Qemu-devel] [PULL v1 17/38] target-microblaze: dec_msr: Use bool and extract32 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
Xilinx queue
|
expand
|
diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index d63226db8f..e322c82c06 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -458,17 +458,20 @@ static void dec_msr(DisasContext *dc) { CPUState *cs = CPU(dc->cpu); TCGv_i32 t0, t1; - unsigned int sr, to, rn; + unsigned int sr, rn; + bool to, clrset; - sr = dc->imm & ((1 << 14) - 1); - to = dc->imm & (1 << 14); + sr = extract32(dc->imm, 0, 14); + to = extract32(dc->imm, 14, 1); + clrset = extract32(dc->imm, 15, 1) == 0; dc->type_b = 1; - if (to) + if (to) { dc->cpustate_changed = 1; + } /* msrclr and msrset. */ - if (!(dc->imm & (1 << 15))) { - unsigned int clr = dc->ir & (1 << 16); + if (clrset) { + bool clr = extract32(dc->ir, 16, 1); LOG_DIS("msr%s r%d imm=%x\n", clr ? "clr" : "set", dc->rd, dc->imm);