From nobody Sat May 4 03:47:18 2024 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.zoho.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; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1497974109243454.4588480385378; Tue, 20 Jun 2017 08:55:09 -0700 (PDT) Received: from localhost ([::1]:49431 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNLUh-0007lg-Mf for importer@patchew.org; Tue, 20 Jun 2017 11:55:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNLRF-00050s-2Z for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNLRC-0003y7-V4 for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:33 -0400 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]:34265) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNLRC-0003xk-NU for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:30 -0400 Received: by mail-lf0-x242.google.com with SMTP id l200so3940551lfg.1 for ; Tue, 20 Jun 2017 08:51:30 -0700 (PDT) Received: from localhost (81-231-233-234-no56.tbcn.telia.com. [81.231.233.234]) by smtp.gmail.com with ESMTPSA id g2sm4031078lfg.65.2017.06.20.08.51.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2017 08:51:28 -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=sDO5PR5v/Zzc+2kVWwndXzXqE/h9nSqwtRQx/zdma6c=; b=elDjcSr5NwDkBINa4dBhEwKhEvS1oE7Ep7U2AEAWi2M+/8TR4oViTK0ZkrYMEP2Upd N2/hxZKsrhdIc/XEWHb/MkyxS9KGb82zIgkxqpb4MiFmQaIQfIDFXCcZcCZEO2PP10FP IgrDcfhTVx9b8RwVDWbTsgVUVEyPBuZPp1MRMr5EwzBgLSbhMrNXCp82tXMeiPvWvF85 dPkI3uvFp/9L+M4cs43ZATAJhttY/NYTkt8LOPWjpyw15EOq0/sUqRAWPkSytJUR3fmK hzD98gdLOl/JiS/mK+aZm/n3GzULxV3jIfO+BrnN2Ye3FSTLVQpfqEqkdGZnDKx4JZcQ S7lA== 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=sDO5PR5v/Zzc+2kVWwndXzXqE/h9nSqwtRQx/zdma6c=; b=azDwvwu5INPXSf3x3lPQR2z6gQmKjcH69v7iF5z9QrWznOG92KzzfcA3JhNVS40+f0 zpGcsbL35IGaSPKj+VsWmTlnomMSLxnQ+lGWw4Ft2Kaly2F8XUHtA1tYB/6stKGjCZcG YOMynxapXgwz9iQ+ggpOhrhADe9BLaIsUgjI9EblcMCJZ4I1ELvd30AkuJyWyWLFn6gH EPznQqaVkwKkMYcjp2072bunWr810nybTIjkawDn1Lyj0jxOg+IfkZeFx/mANtDc4psM DVzREdri6mbQmRoTPVBGEv/cyiy9HdZQ+4XVruOfcgCvIWJBUtUJR2uLRHquCVHEg7rO 4uJQ== X-Gm-Message-State: AKS2vOyOuDN196qSqxh+6r2J0Vno0kp7qr6vIzrOwAxMCeZ/+hRoj7WI yFWbaHSU+0d6gVyp X-Received: by 10.25.211.140 with SMTP id k134mr9885754lfg.30.1497973889052; Tue, 20 Jun 2017 08:51:29 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 20 Jun 2017 17:51:19 +0200 Message-Id: <1497973886-26257-2-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497973886-26257-1-git-send-email-edgar.iglesias@gmail.com> References: <1497973886-26257-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::242 Subject: [Qemu-devel] [PATCH v1 1/8] target-microblaze: Correct bit shift for the PVR0 version field 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: sai.pavan.boddu@xilinx.com, edgar.iglesias@xilinx.com, alistai@xilinx.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" Correct bit shift for the PVR0 version field. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis --- target/microblaze/cpu.c | 2 +- target/microblaze/cpu.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 3d58869..af70faa 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -182,7 +182,7 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **= errp) (cpu->cfg.use_fpu ? PVR0_USE_FPU_MASK : 0) | (cpu->cfg.use_mmu ? PVR0_USE_MMU_MASK : 0) | (cpu->cfg.endi ? PVR0_ENDI_MASK : 0) | - (version_code << 16) | + (version_code << PVR0_VERSION_SHIFT) | (cpu->cfg.pvr =3D=3D C_PVR_FULL ? PVR0_PVR_FULL_MA= SK : 0); =20 env->pvr.regs[2] |=3D (cpu->cfg.use_fpu ? PVR2_USE_FPU_MASK : 0) | diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index bf6963b..68c33e8 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -129,6 +129,8 @@ typedef struct CPUMBState CPUMBState; #define PVR0_USER1_MASK 0x000000FF #define PVR0_SPROT_MASK 0x00000001 =20 +#define PVR0_VERSION_SHIFT 8 + /* User 2 PVR mask */ #define PVR1_USER2_MASK 0xFFFFFFFF =20 --=20 2.7.4 From nobody Sat May 4 03:47:18 2024 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.zoho.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; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 149797399746294.1261917084878; Tue, 20 Jun 2017 08:53:17 -0700 (PDT) Received: from localhost ([::1]:49424 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNLSt-0006FE-Sm for importer@patchew.org; Tue, 20 Jun 2017 11:53:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNLRF-00050u-3D for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNLRE-0003yO-Bq for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:33 -0400 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]:35289) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNLRE-0003yB-4V for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:32 -0400 Received: by mail-lf0-x244.google.com with SMTP id n136so4075492lfn.2 for ; Tue, 20 Jun 2017 08:51:31 -0700 (PDT) Received: from localhost (81-231-233-234-no56.tbcn.telia.com. [81.231.233.234]) by smtp.gmail.com with ESMTPSA id x199sm4014970lfa.13.2017.06.20.08.51.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2017 08:51:29 -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=a5AK+xkimTkw3bsFMpkm4jBsSaY4EToUFgjlK43HD04=; b=awFzqkNel9iTZLXRx0yCQ2+P4l4UHmyh1PLroN2gdgsp3MTFcXdL89+Jd0OOQxX7Sr 0J7yU4iJH8Aukl3xPDHS48FwtQfTQiAfpIGp30/pOfzkTxhR/cXm0/CK+YKL7S0OjU7V XLEzjRz5NM9OSlXwvOIAM3Hv3rCBzWpYfZ94UddbWakfLnP99BbJTnBThzKh37JCSQhO WBqHNJUwwlZ4dEYAZL3dU7zXpbZmiJ4xsPW1bAUKwmtIcTcweTmAfRheoI8Kww0ZrDxL YwtZY8yRK9ihhUb0kfjakOPP0YG6kDusL6Rnmnjfgn5CiNlBJponRQjvpX5eGkRTtkPg Qz/A== 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=a5AK+xkimTkw3bsFMpkm4jBsSaY4EToUFgjlK43HD04=; b=P5ZAWnq695UiUT1iLJYwYHyJBXmIAGyF5jqymsKi8C/qhK/p8cTldxjPbW7HatArFA X65Wi810gc0OeCmSauEkCcMWteghvhkNNUK3w9frdabVbTw/oW25W5zSEgwg6nE9NtPC eGQcZ1mlCBCdyczAAN1velV/CiOOdXyq7e53r/w8aFhI4z5Huu1ApBTv2W1yPj3ir5iP iNxciRRaADUCJ+7JRUK0YLf7NpPzWiv+eY+prvlWHoCxv/tmZ/OU+iRE9OBUFejWCKhu TXpZXS0WedPY1bBfkyOftybIoI2AbaujgzE4JcSR4B7yp379+ie6ZCoPs0YrhAYS+G8f 93aQ== X-Gm-Message-State: AKS2vOyWLlpkD1KOmnIFsFVuq17pdRnAZBLhKUfpnk/FglJmkZK0xTBv w5u2LzCKfbRhCcsK X-Received: by 10.25.165.208 with SMTP id o199mr10395174lfe.115.1497973890574; Tue, 20 Jun 2017 08:51:30 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 20 Jun 2017 17:51:20 +0200 Message-Id: <1497973886-26257-3-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497973886-26257-1-git-send-email-edgar.iglesias@gmail.com> References: <1497973886-26257-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::244 Subject: [Qemu-devel] [PATCH v1 2/8] target-microblaze: Don't hard code 0xb as initial MB version 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: sai.pavan.boddu@xilinx.com, edgar.iglesias@xilinx.com, alistai@xilinx.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" Don't hard code 0xb as initial MB version. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis --- target/microblaze/cpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index af70faa..4bc77df 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -152,8 +152,7 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **= errp) | PVR0_USE_HW_MUL_MASK \ | PVR0_USE_EXC_MASK \ | PVR0_USE_ICACHE_MASK \ - | PVR0_USE_DCACHE_MASK \ - | (0xb << 8); + | PVR0_USE_DCACHE_MASK; env->pvr.regs[2] =3D PVR2_D_OPB_MASK \ | PVR2_D_LMB_MASK \ | PVR2_I_OPB_MASK \ --=20 2.7.4 From nobody Sat May 4 03:47:18 2024 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.zoho.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; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1497974130235188.22715677083613; Tue, 20 Jun 2017 08:55:30 -0700 (PDT) Received: from localhost ([::1]:49437 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNLV3-00086W-1n for importer@patchew.org; Tue, 20 Jun 2017 11:55:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNLRG-00051f-BG for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNLRF-0003yv-MR for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:34 -0400 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]:35940) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNLRF-0003yV-FL for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:33 -0400 Received: by mail-lf0-x243.google.com with SMTP id x81so15465955lfb.3 for ; Tue, 20 Jun 2017 08:51:33 -0700 (PDT) Received: from localhost (81-231-233-234-no56.tbcn.telia.com. [81.231.233.234]) by smtp.gmail.com with ESMTPSA id t143sm4041407lff.28.2017.06.20.08.51.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2017 08:51:31 -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=KBcj5Bh/5UAc/v42A5VJC0IhtIINdNi1GwqioO/ExVA=; b=kR5zAL+oR6oprCP1NM6hWe5ZpvKfeuCJpf8eOVAwIlWsN8rCno5S9mQ/j2QnteZdzS JruXXXWXZc/7ZJq09P9CHtPqOBtWC+9JY05HosMRwePQfFA+C0xYZfb5dNh4S1ARh5Se wEgvzfm0wYHVw1ZGm4x3UH/dpRkXz+ylJEpctv3IM6jbCTNtPZUwMG2f07t999zto5Xr ROKGpi17gTm1OVYbstvtJBroWGubQqXyPkSzcbMuBwXIwmjzh27UzOXdNZk4hiFQw/wS sjyY1KMZia3yAKzGAdWG6GObLEST2QTjx4yxcJY3bhZaGQLoGll1OSulkVI5vcvpVRsu Ukxg== 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=KBcj5Bh/5UAc/v42A5VJC0IhtIINdNi1GwqioO/ExVA=; b=Tyg4RO+m2KxHn98GOYA3w9iLglKyRlCr2TNfiOpUxzGKlBm5DB+0roU5exgnTo+XVo MKv15vgJiplmfr8rQHpc4dxvxyzp3YDjiepuA7E+zElJ+EGvUD0B71h7mewZZActDkNf wnp7U1BZPus2znwoMz3JUdg74TX1DXpGb8Zlmt5InfcCN/4JH4z/C3L5WFALTPXNr1Cc Zf374o3AqW0ErQFkGCZtAWO5fAXGa3+1ZuX6tgoofcr5oD6veFIvsZJm2QlpR64AmmbP jzP3lwrSwHprr68tfJDVYbuv2DdRSG6+J5lqlSl8ev0DAkIU69PPswZq6ywpsRqwJ00M acXQ== X-Gm-Message-State: AKS2vOxsMTm8vU/KD7CbRdQu6u1lS3oerY/Gp5PyFKlMlC/0yCjzQIpD wAzB/zLjrsYBcD8J X-Received: by 10.25.152.208 with SMTP id a199mr9162059lfe.165.1497973891917; Tue, 20 Jun 2017 08:51:31 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 20 Jun 2017 17:51:21 +0200 Message-Id: <1497973886-26257-4-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497973886-26257-1-git-send-email-edgar.iglesias@gmail.com> References: <1497973886-26257-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::243 Subject: [Qemu-devel] [PATCH v1 3/8] target-microblaze: Add CPU versions 9.4, 9.5 and 9.6 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: sai.pavan.boddu@xilinx.com, edgar.iglesias@xilinx.com, alistai@xilinx.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" Add CPU versions 9.4, 9.5 and 9.6. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis --- target/microblaze/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 4bc77df..982cb61 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -64,6 +64,9 @@ static const struct { {"9.1", 0x1D}, {"9.2", 0x1F}, {"9.3", 0x20}, + {"9.4", 0x21}, + {"9.5", 0x22}, + {"9.6", 0x23}, {NULL, 0}, }; =20 --=20 2.7.4 From nobody Sat May 4 03:47:18 2024 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.zoho.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; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1497974308122356.6042668867501; Tue, 20 Jun 2017 08:58:28 -0700 (PDT) Received: from localhost ([::1]:49454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNLXu-0002WE-OE for importer@patchew.org; Tue, 20 Jun 2017 11:58:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNLRI-00052x-43 for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNLRH-0003zI-2Z for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:36 -0400 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]:35944) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNLRG-0003z2-Ql for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:34 -0400 Received: by mail-lf0-x242.google.com with SMTP id x81so15466163lfb.3 for ; Tue, 20 Jun 2017 08:51:34 -0700 (PDT) Received: from localhost (81-231-233-234-no56.tbcn.telia.com. [81.231.233.234]) by smtp.gmail.com with ESMTPSA id n79sm3184896lje.12.2017.06.20.08.51.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2017 08:51:32 -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=AJPVNmNTUJykY3CSMLlR7lOgIT6199AUR7+nPS7kOUM=; b=mgrOw+bKVWuhQ37IN3kSgfJ+1ofJoGigoijAxwNqUvU4++KYoHHIgSuFJILV0IRVrW nb7x5cnHguM1005wBGTkhaLXyJuTlebQ47WZ1M1YdhRRSL8eCZnC0rCVjsiab0wR5HQb hhjrhd7KLFw4ACjNZPLCaXkesoxxJy29QeBEJAcNJf1HCPXXzxmc93WN5i0nAyXpZcg8 LfyCnmceoOADh1svBe0ygJ2M1RMJ+h4HhsKTwpFE6Ssunjor/biZH/+WspiCRz6mFEgQ yE6QYdiJOZCaLCsWhDpOIIlJV2ejG9Lgy3RulJAEamReoXRHOKV1JzKlq76zVVPQz0wh SsZw== 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=AJPVNmNTUJykY3CSMLlR7lOgIT6199AUR7+nPS7kOUM=; b=cL41x0wluNFFCA+CpCMF0a+p2JdsQWku4iGVuK1LiX3Y9kWkc1KqcuSAkla9+Mg6z5 mYma1vHGtkY9B13Z19Ye1TRqZTkOzPu2erlJ5ck5sBxiFPAtOP7s57yeCuD/jKSb9BVe HsB5m7+qkNkuhi4Z7UdRHSGSy1Rdp18++Ho/yNHu5+QIigQx+NyV+d8fYXP9Z+4mH9YA F70flv8nL/ujVspOTDjkIJdyCwzfuQPt0LCuvCNykafeklkxo41nAeKVFkMU42EVljAL c68AHtqgVqehYBG7idtt/Inux3jAis5DRDmfzH8nqEjZtMdK1lOagqXepZwf2K8tBZFy ykdw== X-Gm-Message-State: AKS2vOyHH4RqMXMjBOgES7zV17MLLCMvOKxt+VM3LHQJXcIe1K00pmED ZESCotKsa6Xi+DuN X-Received: by 10.25.199.75 with SMTP id x72mr9292655lff.75.1497973893250; Tue, 20 Jun 2017 08:51:33 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 20 Jun 2017 17:51:22 +0200 Message-Id: <1497973886-26257-5-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497973886-26257-1-git-send-email-edgar.iglesias@gmail.com> References: <1497973886-26257-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::242 Subject: [Qemu-devel] [PATCH v1 4/8] target-microblaze: Introduce a use-barrel property 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: sai.pavan.boddu@xilinx.com, edgar.iglesias@xilinx.com, alistai@xilinx.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" Introduce a use-barrel property making barrel shifter instructions optional. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis --- target/microblaze/cpu.c | 9 +++++---- target/microblaze/cpu.h | 1 + target/microblaze/translate.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 982cb61..bae47b5 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -150,8 +150,7 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **= errp) =20 qemu_init_vcpu(cs); =20 - env->pvr.regs[0] =3D PVR0_USE_BARREL_MASK \ - | PVR0_USE_DIV_MASK \ + env->pvr.regs[0] =3D PVR0_USE_DIV_MASK \ | PVR0_USE_HW_MUL_MASK \ | PVR0_USE_EXC_MASK \ | PVR0_USE_ICACHE_MASK \ @@ -162,7 +161,6 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **= errp) | PVR2_I_LMB_MASK \ | PVR2_USE_MSR_INSTR \ | PVR2_USE_PCMP_INSTR \ - | PVR2_USE_BARREL_MASK \ | PVR2_USE_DIV_MASK \ | PVR2_USE_HW_MUL_MASK \ | PVR2_USE_MUL64_MASK \ @@ -182,13 +180,15 @@ static void mb_cpu_realizefn(DeviceState *dev, Error = **errp) =20 env->pvr.regs[0] |=3D (cpu->cfg.stackprot ? PVR0_SPROT_MASK : 0) | (cpu->cfg.use_fpu ? PVR0_USE_FPU_MASK : 0) | + (cpu->cfg.use_barrel ? PVR0_USE_BARREL_MASK : 0) | (cpu->cfg.use_mmu ? PVR0_USE_MMU_MASK : 0) | (cpu->cfg.endi ? PVR0_ENDI_MASK : 0) | (version_code << PVR0_VERSION_SHIFT) | (cpu->cfg.pvr =3D=3D C_PVR_FULL ? PVR0_PVR_FULL_MA= SK : 0); =20 env->pvr.regs[2] |=3D (cpu->cfg.use_fpu ? PVR2_USE_FPU_MASK : 0) | - (cpu->cfg.use_fpu > 1 ? PVR2_USE_FPU2_MASK : 0); + (cpu->cfg.use_fpu > 1 ? PVR2_USE_FPU2_MASK : 0) | + (cpu->cfg.use_barrel ? PVR2_USE_BARREL_MASK : 0); =20 env->pvr.regs[5] |=3D cpu->cfg.dcache_writeback ? PVR5_DCACHE_WRITEBACK_MASK : 0; @@ -235,6 +235,7 @@ static Property mb_properties[] =3D { * are enabled */ DEFINE_PROP_UINT8("use-fpu", MicroBlazeCPU, cfg.use_fpu, 2), + DEFINE_PROP_BOOL("use-barrel", MicroBlazeCPU, cfg.use_barrel, true), DEFINE_PROP_BOOL("use-mmu", MicroBlazeCPU, cfg.use_mmu, true), DEFINE_PROP_BOOL("dcache-writeback", MicroBlazeCPU, cfg.dcache_writeba= ck, false), diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index 68c33e8..2a4a65a 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -298,6 +298,7 @@ struct MicroBlazeCPU { bool stackprot; uint32_t base_vectors; uint8_t use_fpu; + bool use_barrel; bool use_mmu; bool dcache_writeback; bool endi; diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 0bb6095..26b221c 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -665,7 +665,7 @@ static void dec_barrel(DisasContext *dc) =20 if ((dc->tb_flags & MSR_EE_FLAG) && (dc->cpu->env.pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK) - && !(dc->cpu->env.pvr.regs[0] & PVR0_USE_BARREL_MASK)) { + && !dc->cpu->cfg.use_barrel) { tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP); t_gen_raise_exception(dc, EXCP_HW_EXCP); return; --=20 2.7.4 From nobody Sat May 4 03:47:18 2024 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.zoho.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; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1497974007031433.8027985447576; Tue, 20 Jun 2017 08:53:27 -0700 (PDT) Received: from localhost ([::1]:49425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNLT2-0006Nk-Ka for importer@patchew.org; Tue, 20 Jun 2017 11:53:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNLRJ-000549-D4 for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNLRI-0003zh-FE for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:37 -0400 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]:32899) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNLRI-0003zR-76 for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:36 -0400 Received: by mail-lf0-x241.google.com with SMTP id u62so15459888lfg.0 for ; Tue, 20 Jun 2017 08:51:36 -0700 (PDT) Received: from localhost (81-231-233-234-no56.tbcn.telia.com. [81.231.233.234]) by smtp.gmail.com with ESMTPSA id v68sm4085274lfi.50.2017.06.20.08.51.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2017 08:51:33 -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=dwIqBx3Nb0ybOBCVkBuxFdIV0eMMXP5iPFb+mQ2gQ94=; b=Kwro6xgWv9eDTVNLVzJKjZzurkPxY0V+B6hQRXD+52SPLXrQma5QiG1M/AwwZ1ILlu 0JgFbBujEbOh7HXOG9LurL/lfVgSjfT7bjmiD3yJZxe29vZjvG7iuOaA4pFbVrkJVN0y +o4skZ1ZGf/uRR02bCY289qZVy4dZuTvvLiSIa+SiUQ1imP32fYkL2GWTUmNqb0OYdaM YQxxw6uOyOhOhj6Hi4KlvMRPAINEhw2ipkDaVKa6z2gGcW81cQizaGmapy66Xb4RyQD3 0PhEZfkLpbiqfpZqpfympFdP9Cx/So6giz5Bqg5+xvbcAvwJTtKml+TzQ21lz3Gy58Qr q0Vg== 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=dwIqBx3Nb0ybOBCVkBuxFdIV0eMMXP5iPFb+mQ2gQ94=; b=aox69b9iksmTLnMXzH6zevgnCNSI50M//4DinagkkXABptWs07qe004dPX34VGLAf4 TzLWgJhojk6F0K50vNHJStq/vH8B17JGNtdQK0Pj0oIn6c7nf/I/pL1yT8ExxjrDX4Bh U4+2lR1wDwX7pgmv3ekVkShSHLF4Xg4qxtH84QLVE0hTa8RdRrBjN0tSiF++AgJm1Q/t 8C3HGpJOOeS0iXe77I5JGrcRQG6JSqqZBC1wRK7l9Wvf0VGiho3hE3bSwmDq4nKtzCQE s7kHcQuNsCDS3FQuXxZ8rvbPQUAPGRAraWcV0hYfsfHtYbDS9QWPKpVQcm9wIX6f5TYF PJzw== X-Gm-Message-State: AKS2vOx8PgAWXnlEME/slEt9pHYmEM6eEoSN5sdsDNA1oBDmFT1BeO8b LVvGaKK5CKLCzyuM X-Received: by 10.25.235.69 with SMTP id j66mr572598lfh.141.1497973894656; Tue, 20 Jun 2017 08:51:34 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 20 Jun 2017 17:51:23 +0200 Message-Id: <1497973886-26257-6-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497973886-26257-1-git-send-email-edgar.iglesias@gmail.com> References: <1497973886-26257-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::241 Subject: [Qemu-devel] [PATCH v1 5/8] target-microblaze: Introduce a use-div property 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: sai.pavan.boddu@xilinx.com, edgar.iglesias@xilinx.com, alistai@xilinx.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" Introduce a use-div property making division instructions optional. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis --- target/microblaze/cpu.c | 9 +++++---- target/microblaze/cpu.h | 1 + target/microblaze/translate.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index bae47b5..5bf2a29 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -150,8 +150,7 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **= errp) =20 qemu_init_vcpu(cs); =20 - env->pvr.regs[0] =3D PVR0_USE_DIV_MASK \ - | PVR0_USE_HW_MUL_MASK \ + env->pvr.regs[0] =3D PVR0_USE_HW_MUL_MASK \ | PVR0_USE_EXC_MASK \ | PVR0_USE_ICACHE_MASK \ | PVR0_USE_DCACHE_MASK; @@ -161,7 +160,6 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **= errp) | PVR2_I_LMB_MASK \ | PVR2_USE_MSR_INSTR \ | PVR2_USE_PCMP_INSTR \ - | PVR2_USE_DIV_MASK \ | PVR2_USE_HW_MUL_MASK \ | PVR2_USE_MUL64_MASK \ | PVR2_FPU_EXC_MASK \ @@ -181,6 +179,7 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **= errp) env->pvr.regs[0] |=3D (cpu->cfg.stackprot ? PVR0_SPROT_MASK : 0) | (cpu->cfg.use_fpu ? PVR0_USE_FPU_MASK : 0) | (cpu->cfg.use_barrel ? PVR0_USE_BARREL_MASK : 0) | + (cpu->cfg.use_div ? PVR0_USE_DIV_MASK : 0) | (cpu->cfg.use_mmu ? PVR0_USE_MMU_MASK : 0) | (cpu->cfg.endi ? PVR0_ENDI_MASK : 0) | (version_code << PVR0_VERSION_SHIFT) | @@ -188,7 +187,8 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **= errp) =20 env->pvr.regs[2] |=3D (cpu->cfg.use_fpu ? PVR2_USE_FPU_MASK : 0) | (cpu->cfg.use_fpu > 1 ? PVR2_USE_FPU2_MASK : 0) | - (cpu->cfg.use_barrel ? PVR2_USE_BARREL_MASK : 0); + (cpu->cfg.use_barrel ? PVR2_USE_BARREL_MASK : 0) | + (cpu->cfg.use_div ? PVR2_USE_DIV_MASK : 0); =20 env->pvr.regs[5] |=3D cpu->cfg.dcache_writeback ? PVR5_DCACHE_WRITEBACK_MASK : 0; @@ -236,6 +236,7 @@ static Property mb_properties[] =3D { */ DEFINE_PROP_UINT8("use-fpu", MicroBlazeCPU, cfg.use_fpu, 2), DEFINE_PROP_BOOL("use-barrel", MicroBlazeCPU, cfg.use_barrel, true), + DEFINE_PROP_BOOL("use-div", MicroBlazeCPU, cfg.use_div, true), DEFINE_PROP_BOOL("use-mmu", MicroBlazeCPU, cfg.use_mmu, true), DEFINE_PROP_BOOL("dcache-writeback", MicroBlazeCPU, cfg.dcache_writeba= ck, false), diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index 2a4a65a..4397338 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -299,6 +299,7 @@ struct MicroBlazeCPU { uint32_t base_vectors; uint8_t use_fpu; bool use_barrel; + bool use_div; bool use_mmu; bool dcache_writeback; bool endi; diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 26b221c..afe4bd4 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -643,7 +643,7 @@ static void dec_div(DisasContext *dc) LOG_DIS("div\n"); =20 if ((dc->cpu->env.pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK) - && !((dc->cpu->env.pvr.regs[0] & PVR0_USE_DIV_MASK))) { + && !dc->cpu->cfg.use_div) { tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP); t_gen_raise_exception(dc, EXCP_HW_EXCP); } --=20 2.7.4 From nobody Sat May 4 03:47:18 2024 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.zoho.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; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1497974237624445.9945299752293; Tue, 20 Jun 2017 08:57:17 -0700 (PDT) Received: from localhost ([::1]:49443 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNLWm-00011F-Bq for importer@patchew.org; Tue, 20 Jun 2017 11:57:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNLRK-00055M-T8 for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNLRJ-00040C-Qp for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:38 -0400 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]:35954) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNLRJ-0003zp-JJ for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:37 -0400 Received: by mail-lf0-x241.google.com with SMTP id x81so15466594lfb.3 for ; Tue, 20 Jun 2017 08:51:37 -0700 (PDT) Received: from localhost (81-231-233-234-no56.tbcn.telia.com. [81.231.233.234]) by smtp.gmail.com with ESMTPSA id 63sm3193836lja.19.2017.06.20.08.51.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2017 08:51:35 -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=++Uja2QpsdhcMbz8nBw06pbViXmpgX0mPBmo2sklHRQ=; b=SZP1tLQoiq3jrERyIBwnS+aWb3zy08+lN/5nAKOggu/pXDOl10k/ysGydeAtpyE0a3 tbuLvIu297BjYng+HDWhB4v+zsmiBf8ovIZQxNmPn+aLcoyfghYCFyXiCEgdU1bCsIyY y/CweLzVziBK5HGJtIGuCUgxKyGgOKsJaucPwgXGF4bNYwcNlnSSiD0lusdJ3BFUtv88 LZvuoSCZRsQkZJxFPSaXPEINpi+lm1SjoB8Hr2TJ76NslkoIl7TjTuoFZwIEzqFr4qly RR0hS0OELcNZ9J1H7vHF2B1vEPpJFId8kWj3BugW1nF2kfGqlv9guOTNQhIdHaUSwEWo t2QQ== 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=++Uja2QpsdhcMbz8nBw06pbViXmpgX0mPBmo2sklHRQ=; b=of7vzSBh+b5XZ0S9pLfKNv5KrfJXbleyWinn6a+6nWHgdJNn6Wlte3/O4nCuKFl/Xh fXkdhrFl4boqBTMUzISSK2a8HzrSDDezMD5lSAvtBYkKvEEUywpa73E83Sby2beQAE+c cJd/+3FTwAVaLKYiMFwKFOvnKXGuuG12Jz0a88tEaOn+/ibBzD5KYc3e77giqJdurrcp 0/A/60eSq8FJqE9yJhM4dIPNEIg1fFqmhwuCHcng0XbBFMLYI3aBL5XVv/MsiIeNR1il XfxBbw3a/2oOMIfJ0bmlmwd2NC0GPCqznwR1wUujGJYk4PdmVRRgWo9RJJQBHCoKfFb1 aOsg== X-Gm-Message-State: AKS2vOy+yfnX2a+K0YqJty5IvKjixSouAA21W1vny6do0z+Y2OAQ2YZm N1Hp/UTrrzeo14Fp X-Received: by 10.25.193.72 with SMTP id r69mr10545550lff.111.1497973896071; Tue, 20 Jun 2017 08:51:36 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 20 Jun 2017 17:51:24 +0200 Message-Id: <1497973886-26257-7-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497973886-26257-1-git-send-email-edgar.iglesias@gmail.com> References: <1497973886-26257-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::241 Subject: [Qemu-devel] [PATCH v1 6/8] target-microblaze: Introduce a use-hw-mul property 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: sai.pavan.boddu@xilinx.com, edgar.iglesias@xilinx.com, alistai@xilinx.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" Introduce a use-div property making multiplication instructions optional. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis --- target/microblaze/cpu.c | 12 ++++++++---- target/microblaze/cpu.h | 1 + target/microblaze/translate.c | 5 ++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 5bf2a29..70e4743 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -150,8 +150,7 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **= errp) =20 qemu_init_vcpu(cs); =20 - env->pvr.regs[0] =3D PVR0_USE_HW_MUL_MASK \ - | PVR0_USE_EXC_MASK \ + env->pvr.regs[0] =3D PVR0_USE_EXC_MASK \ | PVR0_USE_ICACHE_MASK \ | PVR0_USE_DCACHE_MASK; env->pvr.regs[2] =3D PVR2_D_OPB_MASK \ @@ -160,8 +159,6 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **= errp) | PVR2_I_LMB_MASK \ | PVR2_USE_MSR_INSTR \ | PVR2_USE_PCMP_INSTR \ - | PVR2_USE_HW_MUL_MASK \ - | PVR2_USE_MUL64_MASK \ | PVR2_FPU_EXC_MASK \ | 0; =20 @@ -178,6 +175,7 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **= errp) =20 env->pvr.regs[0] |=3D (cpu->cfg.stackprot ? PVR0_SPROT_MASK : 0) | (cpu->cfg.use_fpu ? PVR0_USE_FPU_MASK : 0) | + (cpu->cfg.use_hw_mul ? PVR0_USE_HW_MUL_MASK : 0) | (cpu->cfg.use_barrel ? PVR0_USE_BARREL_MASK : 0) | (cpu->cfg.use_div ? PVR0_USE_DIV_MASK : 0) | (cpu->cfg.use_mmu ? PVR0_USE_MMU_MASK : 0) | @@ -187,6 +185,8 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **= errp) =20 env->pvr.regs[2] |=3D (cpu->cfg.use_fpu ? PVR2_USE_FPU_MASK : 0) | (cpu->cfg.use_fpu > 1 ? PVR2_USE_FPU2_MASK : 0) | + (cpu->cfg.use_hw_mul ? PVR2_USE_HW_MUL_MASK : 0) | + (cpu->cfg.use_hw_mul > 1 ? PVR2_USE_MUL64_MASK : 0= ) | (cpu->cfg.use_barrel ? PVR2_USE_BARREL_MASK : 0) | (cpu->cfg.use_div ? PVR2_USE_DIV_MASK : 0); =20 @@ -235,6 +235,10 @@ static Property mb_properties[] =3D { * are enabled */ DEFINE_PROP_UINT8("use-fpu", MicroBlazeCPU, cfg.use_fpu, 2), + /* If use-hw-mul > 0 - Multiplier is enabled + * If use-hw-mul =3D 2 - 64-bit multiplier is enabled + */ + DEFINE_PROP_UINT8("use-hw-mul", MicroBlazeCPU, cfg.use_hw_mul, 2), DEFINE_PROP_BOOL("use-barrel", MicroBlazeCPU, cfg.use_barrel, true), DEFINE_PROP_BOOL("use-div", MicroBlazeCPU, cfg.use_div, true), DEFINE_PROP_BOOL("use-mmu", MicroBlazeCPU, cfg.use_mmu, true), diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index 4397338..e202229 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -298,6 +298,7 @@ struct MicroBlazeCPU { bool stackprot; uint32_t base_vectors; uint8_t use_fpu; + uint8_t use_hw_mul; bool use_barrel; bool use_div; bool use_mmu; diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index afe4bd4..36caa03 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -589,7 +589,7 @@ static void dec_mul(DisasContext *dc) =20 if ((dc->tb_flags & MSR_EE_FLAG) && (dc->cpu->env.pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK) - && !(dc->cpu->env.pvr.regs[0] & PVR0_USE_HW_MUL_MASK)) { + && !dc->cpu->cfg.use_hw_mul) { tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP); t_gen_raise_exception(dc, EXCP_HW_EXCP); return; @@ -604,8 +604,7 @@ static void dec_mul(DisasContext *dc) } =20 /* mulh, mulhsu and mulhu are not available if C_USE_HW_MUL is < 2. */ - if (subcode >=3D 1 && subcode <=3D 3 - && !((dc->cpu->env.pvr.regs[2] & PVR2_USE_MUL64_MASK))) { + if (subcode >=3D 1 && subcode <=3D 3 && dc->cpu->cfg.use_hw_mul < 2) { /* nop??? */ } =20 --=20 2.7.4 From nobody Sat May 4 03:47:18 2024 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.zoho.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; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1497974007524978.237547618255; Tue, 20 Jun 2017 08:53:27 -0700 (PDT) Received: from localhost ([::1]:49427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNLT4-0006Ot-7K for importer@patchew.org; Tue, 20 Jun 2017 11:53:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNLRO-00057S-5O for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNLRL-00040W-5x for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:42 -0400 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]:34295) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNLRK-00040I-U9 for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:39 -0400 Received: by mail-lf0-x243.google.com with SMTP id l200so3941626lfg.1 for ; Tue, 20 Jun 2017 08:51:38 -0700 (PDT) Received: from localhost (81-231-233-234-no56.tbcn.telia.com. [81.231.233.234]) by smtp.gmail.com with ESMTPSA id h83sm3189321lji.10.2017.06.20.08.51.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2017 08:51:36 -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=YmebYcF5xZOBUqSpaicL/NBQpgS0Z9k/FQENWoeTz9M=; b=ZU2fdf72giZiNJ809zKZWWWLURayuNxlzfV6MBoBG04AkEUB2ABnnMWL0+lx6OzYUt 4rcWI2ae0kYQTQq6noVl+oHuOYtaZc0sBc898CkuR0CuSCLfs3003ggbZrgAVvpuXVWO yT/CLEnsE5Bou9QMm1ZXpp9A19LdNfQStOkDHOAY/GnP32qXb6w+cOkiUaXg3Z9DJKKs VU6yKF/feYQyfXuT43sm+vOCyNQFu1dmu5i9VHX1Tmb6s8vR6wWW3WFhB/Qy27dcWDEM +/ggMUkzFfOnW2LFF38zNq+PyX/ye/MorAATOIE/r+6NlKfS6Is/Qzkhy4W04vYkB5ai MzHQ== 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=YmebYcF5xZOBUqSpaicL/NBQpgS0Z9k/FQENWoeTz9M=; b=sXj1PTO+uHWklhPXYDzy1ffUFvS/uUnuJtKbwwhwK63mhkaWnZ2fTbgV6GExKw16TU KprKJMkDC3532L051puDQ7FkgvReha0LYZv42mzt+7SJVxMkzNkLGc4Dt2oklS1z9rZL nETpEmSMnx2S8732JlZ/69EyxfSfcQVSdkNUxFHT1gZvst9P7r4LO66WwIRAlOIxWfvF fXRH7BksNRZZZp3s4z/kVlsSW24rmzG6o34T0JcqaDb92vpsLnSc6dfxVqqOBcHCeu0P 9wlbDkxSRaAtYyVRFp3RBYthz++AiXm7jYI1fFSjhTnp1fZvOsAGQdap9qTYo47o71Ft RbaQ== X-Gm-Message-State: AKS2vOyQ+wSXK2ehS/ikMoJ/PInJPAZx8fQO2afIbCAuTaIu2JG8IDLb bx7IvBqAG9YvWkMU X-Received: by 10.46.74.25 with SMTP id x25mr8953857lja.127.1497973897411; Tue, 20 Jun 2017 08:51:37 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 20 Jun 2017 17:51:25 +0200 Message-Id: <1497973886-26257-8-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497973886-26257-1-git-send-email-edgar.iglesias@gmail.com> References: <1497973886-26257-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::243 Subject: [Qemu-devel] [PATCH v1 7/8] target-microblaze: Introduce a use-msr-instr property 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: sai.pavan.boddu@xilinx.com, edgar.iglesias@xilinx.com, alistai@xilinx.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" Introduce a use-msr-instr property making msr instructions optional. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis --- target/microblaze/cpu.c | 5 +++-- target/microblaze/cpu.h | 1 + target/microblaze/translate.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 70e4743..bc96505 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -157,7 +157,6 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **= errp) | PVR2_D_LMB_MASK \ | PVR2_I_OPB_MASK \ | PVR2_I_LMB_MASK \ - | PVR2_USE_MSR_INSTR \ | PVR2_USE_PCMP_INSTR \ | PVR2_FPU_EXC_MASK \ | 0; @@ -188,7 +187,8 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **= errp) (cpu->cfg.use_hw_mul ? PVR2_USE_HW_MUL_MASK : 0) | (cpu->cfg.use_hw_mul > 1 ? PVR2_USE_MUL64_MASK : 0= ) | (cpu->cfg.use_barrel ? PVR2_USE_BARREL_MASK : 0) | - (cpu->cfg.use_div ? PVR2_USE_DIV_MASK : 0); + (cpu->cfg.use_div ? PVR2_USE_DIV_MASK : 0) | + (cpu->cfg.use_msr_instr ? PVR2_USE_MSR_INSTR : 0); =20 env->pvr.regs[5] |=3D cpu->cfg.dcache_writeback ? PVR5_DCACHE_WRITEBACK_MASK : 0; @@ -241,6 +241,7 @@ static Property mb_properties[] =3D { DEFINE_PROP_UINT8("use-hw-mul", MicroBlazeCPU, cfg.use_hw_mul, 2), DEFINE_PROP_BOOL("use-barrel", MicroBlazeCPU, cfg.use_barrel, true), DEFINE_PROP_BOOL("use-div", MicroBlazeCPU, cfg.use_div, true), + DEFINE_PROP_BOOL("use-msr-instr", MicroBlazeCPU, cfg.use_msr_instr, tr= ue), DEFINE_PROP_BOOL("use-mmu", MicroBlazeCPU, cfg.use_mmu, true), DEFINE_PROP_BOOL("dcache-writeback", MicroBlazeCPU, cfg.dcache_writeba= ck, false), diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index e202229..5c960d0 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -301,6 +301,7 @@ struct MicroBlazeCPU { uint8_t use_hw_mul; bool use_barrel; bool use_div; + bool use_msr_instr; bool use_mmu; bool dcache_writeback; bool endi; diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 36caa03..bb1bdfa 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -443,7 +443,7 @@ static void dec_msr(DisasContext *dc) LOG_DIS("msr%s r%d imm=3D%x\n", clr ? "clr" : "set", dc->rd, dc->imm); =20 - if (!(dc->cpu->env.pvr.regs[2] & PVR2_USE_MSR_INSTR)) { + if (!dc->cpu->cfg.use_msr_instr) { /* nop??? */ return; } --=20 2.7.4 From nobody Sat May 4 03:47:18 2024 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.zoho.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; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1497974399133379.9556046859483; Tue, 20 Jun 2017 08:59:59 -0700 (PDT) Received: from localhost ([::1]:49460 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNLZN-0004Fi-Un for importer@patchew.org; Tue, 20 Jun 2017 11:59:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39043) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNLRO-00057Q-5K for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNLRM-00040j-Lk for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:42 -0400 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]:32917) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNLRM-00040a-E4 for qemu-devel@nongnu.org; Tue, 20 Jun 2017 11:51:40 -0400 Received: by mail-lf0-x241.google.com with SMTP id u62so15460504lfg.0 for ; Tue, 20 Jun 2017 08:51:40 -0700 (PDT) Received: from localhost (81-231-233-234-no56.tbcn.telia.com. [81.231.233.234]) by smtp.gmail.com with ESMTPSA id y10sm2321171lja.24.2017.06.20.08.51.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2017 08:51:37 -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=MnaQqm3UlHzR4TWrkipVdWXvAYALMixwJHiUXGXh17c=; b=GAs1MN/4R2vmZXlJ6yZ4HUxLKCPnnVtsQjZjKPsx7bNphiX9nvMo9gIoEuXudAOrYr TN2zKqtKkBAvRc3PCXpQ4dx11v1Asglale4NZr6ZR7WXpSPuzE17GYz3bIjdZrBERq4/ H1H2zSVpfRL+3pXzcuK3Q3MnQ128IS9JJ/aRBahdbmwkP+UmBvCCsrwDp42uRivxeH44 z9x3vdrtuhrEvdlY6jg0pe/ivSSuohc7wMr/bvm7VvxD6iVlRwWMEFuGWuUFQQ86Bqm/ a34wVli7sc7RksgQa3EqhOFjY5tK7Wr0sKe+eYXTHY871Bxlx/L638IifhAwJVS2hqth IjvA== 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=MnaQqm3UlHzR4TWrkipVdWXvAYALMixwJHiUXGXh17c=; b=jDGgMbP5BANXeTJ/+q8m+SsgWyCN1fSEf7RHtfNyDev4n+ngXsr+ggE9WroShmOIJx 6yNII11Pa/VT2gXB25wDMkR2EAlpGtQgloN1K0qYhESsQd8BXULQsoZg/37foMmYKIEX XTPOUajOkQFYS3FOKrlgLSPnKu4GnFPBovIsPWQaUCfTUK3lh0AlMR1v+BofTbrWTqP/ jIcu2IlHe2XifVPycVHr4zW1COFGfGWoU4635r1mXs+CU7Yo7xHLyav8mp0nucMFMYIB LV2OisfLOv9wcOVVz/WthE0ddWQ4NYtiuEyqJhnwahBCA/q7xh3jhJUrr3uCBj+ntNcZ papg== X-Gm-Message-State: AKS2vOye5EHqj/PrMG/pod5Z5TXJ/FxTLlYoQt+hqi904edDnMHGmDEi Kr00tHmCoRBk0yaw X-Received: by 10.46.70.9 with SMTP id t9mr8889840lja.117.1497973898845; Tue, 20 Jun 2017 08:51:38 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 20 Jun 2017 17:51:26 +0200 Message-Id: <1497973886-26257-9-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497973886-26257-1-git-send-email-edgar.iglesias@gmail.com> References: <1497973886-26257-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::241 Subject: [Qemu-devel] [PATCH v1 8/8] target-microblaze: Introduce a use-pcmp-instr property 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: sai.pavan.boddu@xilinx.com, edgar.iglesias@xilinx.com, alistai@xilinx.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" Introduce a use-pcmp-instr property making pcmp instructions optional. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis --- target/microblaze/cpu.c | 5 +++-- target/microblaze/cpu.h | 1 + target/microblaze/translate.c | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index bc96505..6e27c3c 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -157,7 +157,6 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **= errp) | PVR2_D_LMB_MASK \ | PVR2_I_OPB_MASK \ | PVR2_I_LMB_MASK \ - | PVR2_USE_PCMP_INSTR \ | PVR2_FPU_EXC_MASK \ | 0; =20 @@ -188,7 +187,8 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **= errp) (cpu->cfg.use_hw_mul > 1 ? PVR2_USE_MUL64_MASK : 0= ) | (cpu->cfg.use_barrel ? PVR2_USE_BARREL_MASK : 0) | (cpu->cfg.use_div ? PVR2_USE_DIV_MASK : 0) | - (cpu->cfg.use_msr_instr ? PVR2_USE_MSR_INSTR : 0); + (cpu->cfg.use_msr_instr ? PVR2_USE_MSR_INSTR : 0) | + (cpu->cfg.use_pcmp_instr ? PVR2_USE_PCMP_INSTR : 0= ); =20 env->pvr.regs[5] |=3D cpu->cfg.dcache_writeback ? PVR5_DCACHE_WRITEBACK_MASK : 0; @@ -242,6 +242,7 @@ static Property mb_properties[] =3D { DEFINE_PROP_BOOL("use-barrel", MicroBlazeCPU, cfg.use_barrel, true), DEFINE_PROP_BOOL("use-div", MicroBlazeCPU, cfg.use_div, true), DEFINE_PROP_BOOL("use-msr-instr", MicroBlazeCPU, cfg.use_msr_instr, tr= ue), + DEFINE_PROP_BOOL("use-pcmp-instr", MicroBlazeCPU, cfg.use_pcmp_instr, = true), DEFINE_PROP_BOOL("use-mmu", MicroBlazeCPU, cfg.use_mmu, true), DEFINE_PROP_BOOL("dcache-writeback", MicroBlazeCPU, cfg.dcache_writeba= ck, false), diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index 5c960d0..5ce4c82 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -302,6 +302,7 @@ struct MicroBlazeCPU { bool use_barrel; bool use_div; bool use_msr_instr; + bool use_pcmp_instr; bool use_mmu; bool dcache_writeback; bool endi; diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index bb1bdfa..fbb8bb4 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -326,7 +326,7 @@ static void dec_pattern(DisasContext *dc) =20 if ((dc->tb_flags & MSR_EE_FLAG) && (dc->cpu->env.pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK) - && !((dc->cpu->env.pvr.regs[2] & PVR2_USE_PCMP_INSTR))) { + && !dc->cpu->cfg.use_pcmp_instr) { tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP); t_gen_raise_exception(dc, EXCP_HW_EXCP); } @@ -762,11 +762,11 @@ static void dec_bit(DisasContext *dc) case 0xe0: if ((dc->tb_flags & MSR_EE_FLAG) && (dc->cpu->env.pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK) - && !((dc->cpu->env.pvr.regs[2] & PVR2_USE_PCMP_INSTR))) { + && !dc->cpu->cfg.use_pcmp_instr) { tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP); t_gen_raise_exception(dc, EXCP_HW_EXCP); } - if (dc->cpu->env.pvr.regs[2] & PVR2_USE_PCMP_INSTR) { + if (dc->cpu->cfg.use_pcmp_instr) { tcg_gen_clzi_i32(cpu_R[dc->rd], cpu_R[dc->ra], 32); } break; --=20 2.7.4