From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611822383; cv=none; d=zohomail.com; s=zohoarc; b=TGjouo1QU4tIaKO5YNWO79rb8LXF4vbW3i/xYawBHqJhtaZn7VYTyK+0JxaOixC1QNcGrp0HJYDkqq5IMIB8A19PaPNIe3c0URccOYsRdb7ZNBkDoAc3NAWuCaRnrjQZXr2MCaLRGuVou+zUfzocW3JZhlqJij2LrLE76KZ/bEk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611822383; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XE0PhE5jrT77dVnaZXiyTjuegsVetoGaec703uiwX/s=; b=QsiZcuddMkEG3T3TR+LTr2gmONNhzGHVicFtpWPTbjwdWTrd6xCRM6lVb4NML3YtrVfwaRGaOguc9rKy9SxqeQXr0+rKqhNBKSBGna/LrYFwhDbPBqP7mq29WyE7k9y+G2/OnCnYzlDEFw+sZ2LJp1gHACCskQQTQUPf1NPTA8U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611822383535933.555706775519; Thu, 28 Jan 2021 00:26:23 -0800 (PST) Received: from localhost ([::1]:33274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52dB-0007My-RA for importer@patchew.org; Thu, 28 Jan 2021 03:26:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52ad-0005dR-IA for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:44 -0500 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:35589) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52aZ-0005bs-DM for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:42 -0500 Received: by mail-pg1-x531.google.com with SMTP id t25so3812129pga.2 for ; Thu, 28 Jan 2021 00:23:38 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.23.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:23:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XE0PhE5jrT77dVnaZXiyTjuegsVetoGaec703uiwX/s=; b=N1SwYG/oksao/5xB/+4AXH5ce18FwdUZuyjIokVm3/Uk5Nf0oc3Ie7cQUaSlxytBxq cRV9ccl8wOtwhnvqSB2cFtC3Fyjg4GV2VTsBSgM27FqFHyE1zsjJnZhvsCRu5yIYnU42 uNoEDxvX1Nmy2D7/vy5Yr7XiJXPZSaSW9qjCh5Hg4YfPBt3mxKU2i4dEOR78mnYXc4Hf ObKxjWwJK+m2eG+KBUtDa+ccemn4iNt2MAFr2hjcGEGi/VcSnwhKdc/0ZxLifk8Db2bs M30Wo3nZsqUmgjSBxO3XYZ5KHQpJsG5jnbrZGjr1M1MjiW40rjZVUZ5G4F0FHYhYBRAS 2dJg== 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:mime-version:content-transfer-encoding; bh=XE0PhE5jrT77dVnaZXiyTjuegsVetoGaec703uiwX/s=; b=m0aFFtLgKq6Ei1Q7le6O2AOcahnSo5kOz1a3Fr8SSLGwt2BKddBPJXRUJXyKjfulAK 67HF+DyQ6GgzBNjebHW09zPoJj4cczoVnM3eRBEtGkFV126FRt2RJkO5rXg5+6sjYMco EnWglyjjWz2iO/XtQf0OIT69GPw4hyzTkqYu7qOfgaoPXnEJjRF9/MEc5za07PiDB7It qYPhgBIyG6sf6QPl/0N9OExsLnNVSlbrDeVXqsMxod2IRPgJ9sTgsJtV0paKdHOfAPGo w3lKyTh+ttEw18WGOmsx3x1LJ3XPx4LgAx6Z7ZMIvZbx4Xpsq51KXf6VOpf84N1F0DS6 Jizw== X-Gm-Message-State: AOAM533eF6j7T1/Y+Od3RduUiLWKb6ge7POjXa7PiLMQiwMhh1xtLYSB TjM7y68KTDzatdQN2kznyNGUi5bIifjq7LC7 X-Google-Smtp-Source: ABdhPJwBvO/r08FozQW3sJhH2LKQHv4BE71BUXuDhX7CPaX9B9aD4kp4Mge+myx/VAaAaADVkqFBQA== X-Received: by 2002:a62:ed01:0:b029:1c8:c6c:16f0 with SMTP id u1-20020a62ed010000b02901c80c6c16f0mr5203087pfh.80.1611822216199; Thu, 28 Jan 2021 00:23:36 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 01/23] configure: Fix --enable-tcg-interpreter Date: Wed, 27 Jan 2021 22:23:09 -1000 Message-Id: <20210128082331.196801-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x531.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" The configure option was backward, and we failed to pass the value on to meson. Fixes: 23a77b2d18b Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Alex Benn=C3=A9e Tested-by: Stefan Weil --- configure | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure b/configure index dcc5ea7d63..ad35e26168 100755 --- a/configure +++ b/configure @@ -1119,9 +1119,9 @@ for opt do ;; --enable-whpx) whpx=3D"enabled" ;; - --disable-tcg-interpreter) tcg_interpreter=3D"true" + --disable-tcg-interpreter) tcg_interpreter=3D"false" ;; - --enable-tcg-interpreter) tcg_interpreter=3D"false" + --enable-tcg-interpreter) tcg_interpreter=3D"true" ;; --disable-cap-ng) cap_ng=3D"disabled" ;; @@ -6374,6 +6374,7 @@ NINJA=3D$ninja $meson setup \ -Dvhost_user_blk_server=3D$vhost_user_blk_server \ -Dfuse=3D$fuse -Dfuse_lseek=3D$fuse_lseek -Dguest_agent_msi=3D$gue= st_agent_msi \ $(if test "$default_features" =3D no; then echo "-Dauto_features= =3Ddisabled"; fi) \ + -Dtcg_interpreter=3D$tcg_interpreter \ $cross_arg \ "$PWD" "$source_path" =20 --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611822517; cv=none; d=zohomail.com; s=zohoarc; b=Vp22DDaQuskflQzRYvqsrllv2u/0VG5qcLRY43sruMZcvQRyrHO9ERNYN1UiQUWwa65hlMxuwVBk79DShQ5nXRbhhfjpTA9ZjeiENK2cdko7uOz4CzzDdaDNgDAh35NQFbGxQndAlTSZHhZsatD8svcnh3AAzW9lEg8S5t0tk0A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611822517; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uPRkIqdPM6Tvu9IfyvOETaxBe+ufv4j8HJV64QNku9g=; b=dxB9N5PoRRyLSAyP/oTKl4+FFII/ExtV5fDUALtw0XWe5ke6QCmXeR1CQEDFark/qaRihO9fMzaX0a8cCNaDrvUZhUWliASYBrGvIzK4XzOPXDgE+yL0WXJERYUHoM3jucOr+4CKm3Mpdt/FjLOw8uNujZ9wMntOevc/jwdXe58= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161182251748683.7543387776642; Thu, 28 Jan 2021 00:28:37 -0800 (PST) Received: from localhost ([::1]:41938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52fM-0002bb-0s for importer@patchew.org; Thu, 28 Jan 2021 03:28:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52ag-0005f0-G5 for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:46 -0500 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:41879) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52ab-0005ck-8W for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:46 -0500 Received: by mail-pf1-x429.google.com with SMTP id q20so3522351pfu.8 for ; Thu, 28 Jan 2021 00:23:40 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.23.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:23:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uPRkIqdPM6Tvu9IfyvOETaxBe+ufv4j8HJV64QNku9g=; b=nFVkHam5cSvH4o9/VlbBJYpGR7dgFY+LbE2EIvo+dLqsuD4amoTg6NecYlm6k/a9B7 i1Onre3F4vBC/6m4yz1xM7N1PwZ85MyXdpJJIShLkcTanrZNZQ0fabVgnRsHoZBN4vuS unt4Ne6fQTLyTwCz8mt8xF+G29lzG5zSTQIVWJxxkOmnWK36rTw7hmNtY82fVhC7a7FQ 1taMkR+1WmIc+Nu/Lnuwdou5JTLv9g7k1WGnd+nHOREK717cslFcdo0K9QcrgGeWDD9M 9o432IqhoqSMbGshZkg5tUTWz6Yd492FT3D5Pu+Je3UtTu8t/oZPX91Us8/l0MQNMvTY 5RAQ== 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:mime-version:content-transfer-encoding; bh=uPRkIqdPM6Tvu9IfyvOETaxBe+ufv4j8HJV64QNku9g=; b=YlunD+wDNxDzfBe5QvI1fVZDL3zAp9+59oj3bFkR9bPYESXSTM13hYtYqdV5XFt6aW kGA2d+V0Q6dYyDtlKBSDOiO7ueA0MCSECiGuB1IzMG8GH/CPMzs67i82wzRuTrL7W+Uc HEK3huZSORv/cqabB8/1c4k4LbicHUFcTPmuXv0ZuV4lLkN6TAwC+FfOZbxskG/FvOE+ gZglk4mbnF6+ZJDolKnKQrVOSC4zYmIRkLHe1VxMSLGyRfVsyBkyrzvb8yop8PVamHN5 VBirgmJX4cY/lh6il7Qv9f4MSrAuZNPh73MuzzooKM1XfkNSslaXw02wYN55rJy4xDee lotA== X-Gm-Message-State: AOAM533EwJugtUxyAR+68aQ/igGGvUivaeInfAgHrDUhOQDWDfo+YFRp rLLedx3XMlgCvdUTN2/NaGzTJ2yATQU6HGq1 X-Google-Smtp-Source: ABdhPJzAU2gfqVBGkGisBw6S3H6huE7xJK31zcZm778DJcsk/c6y/IRbPf+Cl1UiT7YAzqcBIJxjVw== X-Received: by 2002:a63:1c13:: with SMTP id c19mr15133338pgc.359.1611822219173; Thu, 28 Jan 2021 00:23:39 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 02/23] tcg: Manage splitwx in tc_ptr_to_region_tree by hand Date: Wed, 27 Jan 2021 22:23:10 -1000 Message-Id: <20210128082331.196801-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" The use in tcg_tb_lookup is given a random pc that comes from the pc of a signal handler. Do not assert that the pointer is already within the code gen buffer at all, much less the writable mirror of it. Fixes: db0c51a3803 Signed-off-by: Richard Henderson Tested-by: Alex Benn=C3=A9e --- For TCI, this indicates a bug in handle_cpu_signal, in that we are taking PC from the host signal frame. Which is, nearly, unrelated to TCI at all. The TCI "pc" is tci_tb_ptr (fixed in the next patch to at least be thread-local). We update this only on calls, since we don't expect SEGV during the interpretation loop. Which works ok for softmmu, in which we pass down pc by hand to the helpers, but is not ok for user-only, where we simply perform the raw memory operation. I don't know how to fix this, exactly. Probably by storing to tci_tb_ptr before each qemu_ld/qemu_st operation, with barriers. Then Doing the Right Thing in handle_cpu_signal. And perhaps by clearing tci_tb_ptr whenever we're not expecting a SEGV on behalf of the guest (and thus anything left is a qemu host bug). r~ --- tcg/tcg.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 9e1b0d73c7..78701cf359 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -407,11 +407,21 @@ static void tcg_region_trees_init(void) } } =20 -static struct tcg_region_tree *tc_ptr_to_region_tree(const void *cp) +static struct tcg_region_tree *tc_ptr_to_region_tree(const void *p) { - void *p =3D tcg_splitwx_to_rw(cp); size_t region_idx; =20 + /* + * Like tcg_splitwx_to_rw, with no assert. The pc may come from + * a signal handler over which the caller has no control. + */ + if (!in_code_gen_buffer(p)) { + p -=3D tcg_splitwx_diff; + if (!in_code_gen_buffer(p)) { + return NULL; + } + } + if (p < region.start_aligned) { region_idx =3D 0; } else { @@ -430,6 +440,7 @@ void tcg_tb_insert(TranslationBlock *tb) { struct tcg_region_tree *rt =3D tc_ptr_to_region_tree(tb->tc.ptr); =20 + g_assert(rt !=3D NULL); qemu_mutex_lock(&rt->lock); g_tree_insert(rt->tree, &tb->tc, tb); qemu_mutex_unlock(&rt->lock); @@ -439,6 +450,7 @@ void tcg_tb_remove(TranslationBlock *tb) { struct tcg_region_tree *rt =3D tc_ptr_to_region_tree(tb->tc.ptr); =20 + g_assert(rt !=3D NULL); qemu_mutex_lock(&rt->lock); g_tree_remove(rt->tree, &tb->tc); qemu_mutex_unlock(&rt->lock); @@ -453,8 +465,13 @@ TranslationBlock *tcg_tb_lookup(uintptr_t tc_ptr) { struct tcg_region_tree *rt =3D tc_ptr_to_region_tree((void *)tc_ptr); TranslationBlock *tb; - struct tb_tc s =3D { .ptr =3D (void *)tc_ptr }; + struct tb_tc s; =20 + if (rt =3D=3D NULL) { + return NULL; + } + + s.ptr =3D (void *)tc_ptr; qemu_mutex_lock(&rt->lock); tb =3D g_tree_lookup(rt->tree, &s); qemu_mutex_unlock(&rt->lock); --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611822385; cv=none; d=zohomail.com; s=zohoarc; b=Xbl2YiVZu5NZ6mSWvNzblQu7A0vQO7qujtOCXpX8wTY5JLnzeKOYCz5BIp7bzAdR7VjJPU+d2N0K8lig8XGRapjf6VrJfWoa0VfB827Y29HnsrlQCeVyX/zvOKzOF8mAiAwIBBqbQYZyK7g8ZRqAFRDdSUnh3RtLl4xw2Y47xfc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611822385; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=RcEW49jm5cwG5H+YCNoBE8sdtPqM5Tz+Y2fGrDe8qGg=; b=QOk2fxbWsfQLh9vzb4wFwUeo523LaPwOKqe7ZPZZjcCwgipfWXfr0ROO2nuqmJj5uEzYr8uSbjDQFZsIPhQHQ6CzoQ1jH0WFvfC3F9JBWl2Sq0xSrLtjODAebyxgZeBmWTu8hz79JJ+cW22aICf5x++OZS1OuAEZbQK849nh1d8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611822385929119.91076299372651; Thu, 28 Jan 2021 00:26:25 -0800 (PST) Received: from localhost ([::1]:33488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52dE-0007TY-Py for importer@patchew.org; Thu, 28 Jan 2021 03:26:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52af-0005dk-3B for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:45 -0500 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:36247) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52ac-0005cr-MY for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:44 -0500 Received: by mail-pf1-x431.google.com with SMTP id u67so3528947pfb.3 for ; Thu, 28 Jan 2021 00:23:41 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.23.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:23:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RcEW49jm5cwG5H+YCNoBE8sdtPqM5Tz+Y2fGrDe8qGg=; b=cxlXSSgiClkq81TrqpRtxPcNVIFWeuVfDXZmv7bqU53wj6PjOecGXe5wASn08IUnFY VHtSgY6N/jsArLV/yDryu6BB8jVc1+S696eJDSc32V5H+bbfT409Y6i2N/02sy0fBMkS FxYkuXrEY9elwBseOy7XWmhgTUTVRxrnqMVBxRsfbQRTGHRrHTX2M3zgLRbZurGkRigv G3fhE2q9+XuB9lhx0Oq8Qd5z3MTXZZU3bSO74NPFe8qIVjWzFNdYaepV16+YaaG2EP3h vZeBlXBz0nonyX0SpHloAnMcFaXZDDMHKldocPYL83SHiRJmJR+c5HjAjplT1KKvIMnI 6hbg== 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:mime-version:content-transfer-encoding; bh=RcEW49jm5cwG5H+YCNoBE8sdtPqM5Tz+Y2fGrDe8qGg=; b=CaWzhWUxifjnryXJuilgREGkhsvBLK+BMQqqGZPSRXYTFqipMWn+BTkatPcA2krjdb WKn269GkdhKvWj33pjuChMIyBBR1zYgdyrpSUoQDPujMlUJF+kH/Kdtdzlzb/VGb1Xo/ zcmbT/W47nRjRsQWpDHnJay15nvyXio67hayroz2C3dowDJAlvrByUf8+e1hX7T0kx9G QLFZwWqqCmGlfrAYDmpzQLQl8t3wG4XK4Xzxi6T5b6Xbq/AtBp0xC/KV31m4VJHgGr/W OkueuEEF5CmJNAcLXrQhwCJbf1Hih46+lQeTmLn+21yJknq8s5TQTWrsKCZ1OPkI8EtH FDqQ== X-Gm-Message-State: AOAM5303taxkQ5cyp8lw6RS3aHdfzCYG+znxYpzQv+Scw2RL/4lwNaR/ rcgHR53vpqQ+SX+2ePwiVuEtDoXrLSsGM81R X-Google-Smtp-Source: ABdhPJye8K8Rw1XYkfGYIG+EuST2xfq+9/XINQkRXEnMsxr82gXBStVCBrYT5pNxGKfvQ6DzAIRU6w== X-Received: by 2002:aa7:86c3:0:b029:1c1:a025:b2ff with SMTP id h3-20020aa786c30000b02901c1a025b2ffmr14746805pfo.14.1611822220749; Thu, 28 Jan 2021 00:23:40 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 03/23] exec: Make tci_tb_ptr thread-local Date: Wed, 27 Jan 2021 22:23:11 -1000 Message-Id: <20210128082331.196801-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Each thread must have its own pc, even under TCI. Signed-off-by: Richard Henderson Tested-by: Alex Benn=C3=A9e --- include/exec/exec-all.h | 2 +- tcg/tcg-common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 125000bcf7..f933c74c44 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -544,7 +544,7 @@ void tb_set_jmp_target(TranslationBlock *tb, int n, uin= tptr_t addr); =20 /* GETPC is the true target of the return instruction that we'll execute. = */ #if defined(CONFIG_TCG_INTERPRETER) -extern uintptr_t tci_tb_ptr; +extern __thread uintptr_t tci_tb_ptr; # define GETPC() tci_tb_ptr #else # define GETPC() \ diff --git a/tcg/tcg-common.c b/tcg/tcg-common.c index 7e1992e79e..b183db84c7 100644 --- a/tcg/tcg-common.c +++ b/tcg/tcg-common.c @@ -26,7 +26,7 @@ #include "tcg/tcg.h" =20 #if defined(CONFIG_TCG_INTERPRETER) -uintptr_t tci_tb_ptr; +__thread uintptr_t tci_tb_ptr; #endif =20 TCGOpDef tcg_op_defs[] =3D { --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611822518; cv=none; d=zohomail.com; s=zohoarc; b=JxCjHWHhdMpKCu0gNFDZ+I4wFHIM8R/l5s5jKxnnZEs5+nMxjEe51qXCNyUYFYq9wLGKUr7llyKKPWac9zT+rSVz3eanmWALF2We/gzQuvy4sbFPzzckqlOTDC+/37Cp+fZSt/4REjLyB+r+LTzq5C+fgEfY9rnJstVszgSbFEs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611822518; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ef0r5gdQfikjl87vGZNBaWDeqf7Ic5J6b7LYEuBGeCg=; b=YIVcRp7yECXXrOrOrz+aENlEZIMJiRFHLr3GMv4xFYDFRUQTLqbVqjcnS56eUhwK2pnlqZ+Uax6upUAscQ0aAJYrEek5y7qLjCNNpE2eBaCoLg5vRC7yvUZwBiIKzCU1VTSsXBKhuPJvsmH2iqJKag6VNvjCKg3VTjUR8z7up10= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16118225189381004.1413794241107; Thu, 28 Jan 2021 00:28:38 -0800 (PST) Received: from localhost ([::1]:42294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52fN-0002lH-UR for importer@patchew.org; Thu, 28 Jan 2021 03:28:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52af-0005ez-SX for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:46 -0500 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:37398) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52ad-0005dp-UX for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:45 -0500 Received: by mail-pl1-x62e.google.com with SMTP id q2so2925201plk.4 for ; Thu, 28 Jan 2021 00:23:43 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.23.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:23:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ef0r5gdQfikjl87vGZNBaWDeqf7Ic5J6b7LYEuBGeCg=; b=wf0mcJtqN9XKwb+ztupLua5SafJF7s+LxA0rbUxDcxDg7241lkLAnkrCMd/Xey2dtS J14bsk6R3Viggc+MFt8How2r+n/CsBCq7yeG1jBQPVLwDKjsRPdJDfFRzbgpd5zFZfLh jURq3aHossuWBFS3hMBQWVQgVzrt8iAuRM35PlVHmKu+Zm5Qmj/aq4SI9QkUwGaaIT8e Ig29/UIABuZFb7G0kvuCTtlM44fPrlaCi5sozRs9lcJ+d7qWJj6VT6TJmSZPbocFot23 mWNJ6qhb/9DGMuUNnKT6O5Wn7rk/rEBa9mbQK/TLW4/GYdsGVz3JZe3O7S90+jidxox4 jzMw== 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:mime-version:content-transfer-encoding; bh=ef0r5gdQfikjl87vGZNBaWDeqf7Ic5J6b7LYEuBGeCg=; b=SuucskBiFZZdxA8XW7skHWRl8knmPMIDklJHWWgn6WGfsNKeD76WkxT25rQD/W9B6U DnkVhLxN8IEnzTDF9RZUllEvzCuIp75xOF976vBr7fGJB+0NLSgrXS7FMDm0PqPPMNBC N7B/x3SPFLgONhiMUnV5v+EhRMJFXH3TYPqJE1ZRGVyja1RPehss+FUglMSHekWoMPe2 8zFymgvVQDw3invN3HcKZ3BhJnR25G55RDWxRfX+C3ksgGO7lumYQsYx0MTCTFlbjQhD D8pUh2zpRxfvsIS+FRdrd+zIckXzj5lKSXaq6B18+rkzzZO/YGlQbixH0E1oNLvOXWlu ur8Q== X-Gm-Message-State: AOAM530cQUUfI8O/3S9TwdLUxqTrPTyr6Ar2T5y51m+tj4NxUzXG9svP V5d7ufAMNy8T7UhPWFqjC5MuiGxcJUSUJ9y0 X-Google-Smtp-Source: ABdhPJy5YEUbEgQ3Wl6/kNkz6BVxRCg7KvWrPoVNjUi1FkhGerdbXK7f0EGgPsVE6kCaAMhcOKYBIw== X-Received: by 2002:a17:90a:5911:: with SMTP id k17mr10055161pji.152.1611822222377; Thu, 28 Jan 2021 00:23:42 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 04/23] tcg/tci: Implement INDEX_op_ld16s_i32 Date: Wed, 27 Jan 2021 22:23:12 -1000 Message-Id: <20210128082331.196801-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Stefan Weil That TCG opcode is used by debian-buster (arm64) running ffmpeg: qemu-aarch64 /usr/bin/ffmpeg -i theora.mkv theora.webm Reported-by: Alex Benn=C3=A9e Signed-off-by: Stefan Weil Message-Id: <20210128024814.2056958-1-sw@weilnetz.de> Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tcg/tci.c b/tcg/tci.c index 2311aa7d3a..2edb47506e 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -614,7 +614,10 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSta= te *env, TODO(); break; case INDEX_op_ld16s_i32: - TODO(); + t0 =3D *tb_ptr++; + t1 =3D tci_read_r(regs, &tb_ptr); + t2 =3D tci_read_s32(&tb_ptr); + tci_write_reg(regs, t0, *(int16_t *)(t1 + t2)); break; case INDEX_op_ld_i32: t0 =3D *tb_ptr++; --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611822517; cv=none; d=zohomail.com; s=zohoarc; b=kMM4grrpCgHpt4bQPu0sFdE/ah1TbxRJc4Q//p06NfC5XczEs6t1ZDtg12i8m9w7NqDh6tZBAR682oOGX+L2rRN8FlbjJ7EJ8dNvUMaxx5Ob4XZ0RJNputw0mH1lfG4CW4Sly8XHMN/cshLqDmMpGglr6h2hReK7Tb6G1ZJ1lGI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611822517; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7upBAxh+r6e67PJNYJC15zDRNacBwT3vrKSjjXc1s0Q=; b=nKcJYRiLQ4BtyD+QWsUfPDTm8NuiJYcnOqgMmxywyaU2DHqUWhtVfPmnlW67UdvO0RLP2m6fvSMbf0K/S3whmE3mkp5pNT3I+t1Of1BY6sUgsaowzOD2PuqK85B3lWfmZLjsxFqjpakVZ/+bKDzYrsw3Qib9SPBDH3POvTAR19I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611822517910163.2675535978043; Thu, 28 Jan 2021 00:28:37 -0800 (PST) Received: from localhost ([::1]:42122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52fM-0002gK-Oq for importer@patchew.org; Thu, 28 Jan 2021 03:28:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52am-0005jJ-25 for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:52 -0500 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:43191) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52af-0005e4-K0 for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:51 -0500 Received: by mail-pl1-x631.google.com with SMTP id 31so2908147plb.10 for ; Thu, 28 Jan 2021 00:23:44 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.23.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:23:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7upBAxh+r6e67PJNYJC15zDRNacBwT3vrKSjjXc1s0Q=; b=jGAh5On0geQZGQLoV+mk0Cdxo7APB7y2C4I9jg//oJjt4Kb2XcCvllYpv6mWWl/8p7 3jHR7Dz8rbxZy3rI+ayRtERDFpKT2nAgnj7gmWHKMU3Xc1Ud5kE0RsSEGCpRID/ZR2zs FIyvpKBVh4yoy4XrzR0dNnDWbssBcNDogRUJEpB98UsdzzOycqpaumjkQiEla2vxRgo3 6NYMiYZUwXSs63tR88Dwp6cDDJ6QPaC2prLK7QxMtjgE0EHE/Qv2oDVpiIO503J1ATXR yrhxQkv/s7N5IcK8Ws0ko4T7+xC/y3ZF8wVVMcOi1w3+aFhM1VyXXBdJFAScUcoAl30o hOsg== 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:mime-version:content-transfer-encoding; bh=7upBAxh+r6e67PJNYJC15zDRNacBwT3vrKSjjXc1s0Q=; b=UL2ysjLEqluPPTkLsJEBVqzymgcwre/z1SAA2gHuBji/opNP6sZOHtx83HmTna10S/ Jp6XxeOY5qZfQ7g8RmOtVqkqhS3hXBVaNc61xedfePBGjTmolF2Zu1eDOln/XRWZiloL XAb3EGv9CztnA+l330beRZNfNKAk8y0AYR0KokTVK12/BeL4AJDSjrTzNOc9b+IwMfIB fRf4mC1N/4clYFistSZN7KSZqAOhk2L4rgEdvW+L47eU3f6dZn9gfwdRozeVPUFUhl4s N1ynBn7fuXG46L+5c+h5KW+Xdit1orJH3nhGetGxNf42LQrZNruvnz0gmY18PR/QajqC g95Q== X-Gm-Message-State: AOAM532ZkHquMs51hewthy76eqmATwXEP6W6i1b6LFqjb4fSkJ5Efav9 huzyDi1AcBvA6TcRVxgqj/aYDT2zLru2vp8P X-Google-Smtp-Source: ABdhPJwbevZy8XHB9fL2FD3mF6YrR83zJVuX3Coh+zdePxDwa4NzUk7mlKUk2MawDjjPcamjc0+Gow== X-Received: by 2002:a17:90a:cb0f:: with SMTP id z15mr10375103pjt.88.1611822224056; Thu, 28 Jan 2021 00:23:44 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 05/23] tcg/tci: Implement INDEX_op_ld8s_i64 Date: Wed, 27 Jan 2021 22:23:13 -1000 Message-Id: <20210128082331.196801-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Stefan Weil That TCG opcode is used by debian-buster (arm64) running ffmpeg: qemu-aarch64 /usr/bin/ffmpeg -i theora.mkv theora.webm Reported-by: Alex Benn=C3=A9e Signed-off-by: Stefan Weil Message-Id: <20210128020425.2055454-1-sw@weilnetz.de> Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tcg/tci.c b/tcg/tci.c index 2edb47506e..0e1b8e8383 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -882,7 +882,10 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSta= te *env, tci_write_reg8(regs, t0, *(uint8_t *)(t1 + t2)); break; case INDEX_op_ld8s_i64: - TODO(); + t0 =3D *tb_ptr++; + t1 =3D tci_read_r(regs, &tb_ptr); + t2 =3D tci_read_s32(&tb_ptr); + tci_write_reg(regs, t0, *(int8_t *)(t1 + t2)); break; case INDEX_op_ld16u_i64: t0 =3D *tb_ptr++; --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611822802; cv=none; d=zohomail.com; s=zohoarc; b=h+bjVhWUyi4vXbUC2Hlq9jCbKPf0+WmxOxDJSoEXdHZ5ztDxZkYW79SdhPqvfJOVaX+kEGLfSTqjqpS18sir5NeCR0iDW11rP72VXgmWuz7AJ9iviyLTDhd0uK2C6TuqZbxovoEvVan+B71RwgGRl+lWrwuVBFpjockFkilf8Lw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611822802; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IFXwe7/lgpsoi7BHwGAB+iNJY2cLRCPx5UvuWr2ycbA=; b=nSR0/5Sv+Z1HBkkMgLkdqO0xVK+LaWjTv0wAfFc6qZ+PR8ryCoU2+KNmDzebXjupdT47EPRDkjDGhNt87x4XHUI6Y30UJhKMY6asuZcwR3srLzufud2Y78Z/9seRj4U5mb+cID+lJ6QaUMUUCV1tXs17DtOOSiUt+SOOO64wdco= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611822802656719.7103093138841; Thu, 28 Jan 2021 00:33:22 -0800 (PST) Received: from localhost ([::1]:50864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52jx-0006NP-Ho for importer@patchew.org; Thu, 28 Jan 2021 03:33:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54364) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52aj-0005hO-JI for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:49 -0500 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:51017) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52ag-0005fL-Pv for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:49 -0500 Received: by mail-pj1-x102b.google.com with SMTP id md11so3436588pjb.0 for ; Thu, 28 Jan 2021 00:23:46 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.23.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:23:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IFXwe7/lgpsoi7BHwGAB+iNJY2cLRCPx5UvuWr2ycbA=; b=oI7GU2WD09wGZp5KsTGlEmfTIkWmUvF7ec4tfPDEGVopw4IZCPVlpjpALNS10YnqOT zLn3gP5omBzXEK61v+EKs/fZHKIpuckkG81bshFADaDYaHKDzlls3TXIJD5SZ3p0ZIXE QDMd7vDztat+djebQxGTbIg8/vNr0ueIkepEKAL0pXimOrENaFS3er/w67qJWYO29uYk vzl+Cb6lCuFbueMggGjaX6HE24coddsUoD0JViyvHFqZyA4EIk94ih5WMp+eQN8gjJ/J cjyW14fwa32bbT4QUYMaCmAGo3m1ILmWF79oiAquiVs8Opm68XdP/SGrUcNF5jcwSg+q OKhw== 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:mime-version:content-transfer-encoding; bh=IFXwe7/lgpsoi7BHwGAB+iNJY2cLRCPx5UvuWr2ycbA=; b=eerHC/7+s2wodbWU2AcwCqiRVqYHf5xq6soWv2ND01bipPH+lLZ2ybbI+1F/IK2GDf 2JGRRuZDa3L3MO7YlwmARAqfOJXjfoinJHVTzbZCZ4xB8YMRW6lPMOliKd/VImERwBGf 5hd2qaT3WS+MpFTDHUAv4DsEw/SXFhPAcuCsUFaP5keBbIHOIeeq6mCA0ZvRmGD878p1 KyxwJeddSDFj0Q1mZ/bvMwxp3P5oQ7qinLHk+evvu9xIJCjhMTEvKu1q2ZvMo+hxStCM aVkhBcqI8mr//EXebLYOvMZmUHq33/VIN9vCZxcLYvecw3BtmyPJwMBvW2OmgAPnmKxz STEQ== X-Gm-Message-State: AOAM532S6u+xAuYYyo1e2YAnQ81DWbRHcqP62+92YmB6LxWTfixJV6kB eZjSUBrmWf8oZ/fEdky+xqt+Avu57JKLvMnx X-Google-Smtp-Source: ABdhPJz+rEoJjR/hM9FqvouZF8+lU4b2ATmTREvfzY50sY2jRZJOjrxMdNtKSc3JWhfA/VUEny+6mg== X-Received: by 2002:a17:90a:886:: with SMTP id v6mr10050218pjc.143.1611822225630; Thu, 28 Jan 2021 00:23:45 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 06/23] tcg/tci: Inline tci_write_reg32s into the only caller Date: Wed, 27 Jan 2021 22:23:14 -1000 Message-Id: <20210128082331.196801-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 0e1b8e8383..438d712ea8 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -115,14 +115,6 @@ tci_write_reg(tcg_target_ulong *regs, TCGReg index, tc= g_target_ulong value) regs[index] =3D value; } =20 -#if TCG_TARGET_REG_BITS =3D=3D 64 -static void -tci_write_reg32s(tcg_target_ulong *regs, TCGReg index, int32_t value) -{ - tci_write_reg(regs, index, value); -} -#endif - static void tci_write_reg8(tcg_target_ulong *regs, TCGReg index, uint8_t v= alue) { tci_write_reg(regs, index, value); @@ -906,7 +898,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, t0 =3D *tb_ptr++; t1 =3D tci_read_r(regs, &tb_ptr); t2 =3D tci_read_s32(&tb_ptr); - tci_write_reg32s(regs, t0, *(int32_t *)(t1 + t2)); + tci_write_reg(regs, t0, *(int32_t *)(t1 + t2)); break; case INDEX_op_ld_i64: t0 =3D *tb_ptr++; --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611822388; cv=none; d=zohomail.com; s=zohoarc; b=OGSv961sCqfR/vtv5rovTv9E0FKjSiQY51KdwrK5MkVp02kECh+VuLlvE+KSB9isefZGQ+2qYxlOqWKbMmy1dIoA/u9PvZ2pz9vEFijm/pzLU/vZwuCWACsnVlxrCTa5l8FCsz1ABDXHcPApkIqw67FoaYS7K2TPE5jLucQGeJw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611822388; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=l0eUP1VaXHMBkk451t+GkbylYNcWplkEv/ZGs0ScxGk=; b=WRmnvKrTlrfOOMjyQOBDF79+yw60d+ktsIO287nbQfeCzQOyojJJ5F5JE2EMqDtN83ul1hFGszcdLfTyQBqD02s2SiHZBLRDkOHzef7XgmfmIOwyJyXrMjsgD7GIyhNy4AIb8O3/EtBgD78ogmcTB6d3EGYvBZzMl+mYRtZIBkw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611822388689752.0175842327039; Thu, 28 Jan 2021 00:26:28 -0800 (PST) Received: from localhost ([::1]:33728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52dG-0007Zp-DV for importer@patchew.org; Thu, 28 Jan 2021 03:26:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52an-0005md-CD for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:53 -0500 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:40212) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52ai-0005fz-7c for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:53 -0500 Received: by mail-pj1-x102e.google.com with SMTP id jx18so3840211pjb.5 for ; Thu, 28 Jan 2021 00:23:47 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.23.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:23:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=l0eUP1VaXHMBkk451t+GkbylYNcWplkEv/ZGs0ScxGk=; b=PRSI/+xAowVjX+DPSslJmuanL7/FBksmBGRhaJcmRcv2Qq+cDVNISTmQOjd4EYpmpv X0fceRrfMLHnFgPoJLqlzRoMCzXy7HNqZsaoGwqZe8WpUMge9nVdcMs9qdXeRO7mL/kv OirQZWUNguWrco5PtRWCr5J+RFzFk0iBluvWaGSME7Av+VCWtkhIEoJ2zCM13uN4ygAC PvA709ZoXnFRiynYiEIM0daffMdZeTCFYj6UZcy3edYgkDbixJBokLLvVbBGyaLl0BGf 0aLJ9fRAVEKaAMUSjh8fTG8Wv7q3LDjNGLdV9G3CMwBosYUv1OhVAElHfgppuYyn/Lwu CjRQ== 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:mime-version:content-transfer-encoding; bh=l0eUP1VaXHMBkk451t+GkbylYNcWplkEv/ZGs0ScxGk=; b=Cl1CqrUsLu4K+gtpBuyZbzIP2E0uGza3VYn+DczRcl0TLFACrrANmtyVS8wNLHDG+d oyvlr5EkEHNYTV/85pVrYDqITGFmebbKxMhv2qbg4l13/trpL5HPN8f196boNdSsMY/h TtnecJtIle2OZsYdR0kurGghVGh/4XsPR40o+tg6LfEa9jU8MYn3cBhq4D+3WwvPkPd+ s1NmMv7H/fw3wVvdY5vuYXxuBjDrCVKxCkaR6854jQ+Mo8T0nin32z85ELjn8F/fEdlI zmDxsJHSenmKhkTIYpc7QqTBYkkdwjevQGNKQqcLCQU/6LmLZhTaVt+j6et3M/eTabF0 Pj4A== X-Gm-Message-State: AOAM532kvLo5BvvHBwcO01lvoDlPtrTpaUv/MsH8NC8yUV5JJm/GAwv0 EsDZHbl/WcvTF9ifcwGkIXsCYZcoVWeRWD9s X-Google-Smtp-Source: ABdhPJzJFRvaDh6+PMUZyD5lkdX6PlqB/8HNeNxGMxapvifh9TwCwj8ckRAxIf8BySt7L67F5eJo7A== X-Received: by 2002:a17:902:9a4a:b029:dc:435c:70ad with SMTP id x10-20020a1709029a4ab02900dc435c70admr15031849plv.77.1611822227038; Thu, 28 Jan 2021 00:23:47 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 07/23] tcg/tci: Inline tci_write_reg8 into its callers Date: Wed, 27 Jan 2021 22:23:15 -1000 Message-Id: <20210128082331.196801-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 438d712ea8..7797558b2a 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -115,11 +115,6 @@ tci_write_reg(tcg_target_ulong *regs, TCGReg index, tc= g_target_ulong value) regs[index] =3D value; } =20 -static void tci_write_reg8(tcg_target_ulong *regs, TCGReg index, uint8_t v= alue) -{ - tci_write_reg(regs, index, value); -} - static void tci_write_reg16(tcg_target_ulong *regs, TCGReg index, uint16_t value) { @@ -597,7 +592,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, t0 =3D *tb_ptr++; t1 =3D tci_read_r(regs, &tb_ptr); t2 =3D tci_read_s32(&tb_ptr); - tci_write_reg8(regs, t0, *(uint8_t *)(t1 + t2)); + tci_write_reg(regs, t0, *(uint8_t *)(t1 + t2)); break; case INDEX_op_ld8s_i32: TODO(); @@ -871,7 +866,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, t0 =3D *tb_ptr++; t1 =3D tci_read_r(regs, &tb_ptr); t2 =3D tci_read_s32(&tb_ptr); - tci_write_reg8(regs, t0, *(uint8_t *)(t1 + t2)); + tci_write_reg(regs, t0, *(uint8_t *)(t1 + t2)); break; case INDEX_op_ld8s_i64: t0 =3D *tb_ptr++; --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611823005; cv=none; d=zohomail.com; s=zohoarc; b=P4KftsfKUMKGfJ76yqd8Hj53Pic9080BQacDke56EJlu/khsnd+pM3llzSRrBDA9+y99MHieR8zDLlXjyGvkEE0bnfhqMJeSsoBV3+SmZEMm8vfce3t/ZeXrf6r0n/40mxzuUY09qLqke9bdqp2A2YcQpQ0JTQAiwrBCHL2NYwI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611823005; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=cOgrGYJ9ocKkQI1BJmncTz7ux/wby7mu15LsccKn+9k=; b=HpF5+TvEGBm2l7y54oqLbGhQL+qBIMCvtjOC8P+hrWPhg0qkLx2dFF/cTlQ5Tujpct/egYMsswJBFl8ZCGjtUKlu2swVbvVT2oOer3WhMEV9ywDjEP34g+xC593tJOdtuGOsWjTNiynujySam5kYNzIIboAALZGEJ2rPKM5yUFo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611823005417426.186807827558; Thu, 28 Jan 2021 00:36:45 -0800 (PST) Received: from localhost ([::1]:59424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52nE-0001Qm-AW for importer@patchew.org; Thu, 28 Jan 2021 03:36:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52am-0005kQ-GP for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:52 -0500 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:38765) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52aj-0005gO-N9 for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:52 -0500 Received: by mail-pj1-x1033.google.com with SMTP id l18so3842614pji.3 for ; Thu, 28 Jan 2021 00:23:49 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.23.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:23:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cOgrGYJ9ocKkQI1BJmncTz7ux/wby7mu15LsccKn+9k=; b=HTvH6tltENJGruTIznKyOu701bZoPaRbJFyljVg9BUtRmrgzNGEe7EgCOwb5ZsmNiP TThOHrOGh6KyoUsPYru7jJuUU+PEZbKBkbFR7Nb6bDxKonXi04/oLHeT+KFSSDQqYTw2 vW8J9nRzD4033SEh9wRF1aovRvyGu39sE/bk6Sdvy7T2zTA9Y9O0CEHKqXESD4ODUCvn GlKpbWBRfU9y2Ft+X1CgtngSBFvV2GsFT4L4usN36C7mgFZA0GxgTQN21OOS03WGv7/K CxAmxSAX+dzWKgY+YVegDXAEM1K1L0y+RSHbjTne3SVAKB0ieiF7wRpbVXp/CC2JQDXs 27/Q== 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:mime-version:content-transfer-encoding; bh=cOgrGYJ9ocKkQI1BJmncTz7ux/wby7mu15LsccKn+9k=; b=PHHwIJIgMI9MrnMGQfV5Bc6OOwhSGyEniSjJG/vo5N8VDSqG53scliizmU4pevij4i sovr68JaXFe/g/6CNk/zcPDhy2Mg18jdwdpriROTJQC0R6vHNgBmhmPZcUSPq4XIx6cm MlszkRJas1LB/Dq5a8QzVpZwfcY9X7fxI12WSzJtx7PWhCj9PJlIpHkk0W0n0u6nP47X OMQ8LNfrj6JWRj0JrFfSgYZYgeE8txDIw85+wkX52ftaKgU1lMZSjSGvDE8LbkzfxQkW cxI9EAg/n4/zov+cgMQUzgfE7DcAtuyy//Fal6re/JjZJL53kyv266n3bQi0Ali9wH3F KntA== X-Gm-Message-State: AOAM532rWLmRNPY0zdOGRBtNTjhtw42Dy8QGGFUV6T8PeB7o8Cl3Bucm 6qSUdr8CO7ETk5lU9qRuzPlLLuz6cqoqyGDU X-Google-Smtp-Source: ABdhPJzotY95/T+836ekQQ1XWJWGQG/Q3pVP9tM1frev/I9MszzvLBkhNIdtfwBTvscgMWQkPAW7RQ== X-Received: by 2002:a17:90a:c404:: with SMTP id i4mr10109369pjt.57.1611822228536; Thu, 28 Jan 2021 00:23:48 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 08/23] tcg/tci: Inline tci_write_reg16 into the only caller Date: Wed, 27 Jan 2021 22:23:16 -1000 Message-Id: <20210128082331.196801-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1033.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 7797558b2a..0b27f26cfb 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -115,12 +115,6 @@ tci_write_reg(tcg_target_ulong *regs, TCGReg index, tc= g_target_ulong value) regs[index] =3D value; } =20 -static void -tci_write_reg16(tcg_target_ulong *regs, TCGReg index, uint16_t value) -{ - tci_write_reg(regs, index, value); -} - static void tci_write_reg32(tcg_target_ulong *regs, TCGReg index, uint32_t value) { @@ -878,7 +872,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, t0 =3D *tb_ptr++; t1 =3D tci_read_r(regs, &tb_ptr); t2 =3D tci_read_s32(&tb_ptr); - tci_write_reg16(regs, t0, *(uint16_t *)(t1 + t2)); + tci_write_reg(regs, t0, *(uint16_t *)(t1 + t2)); break; case INDEX_op_ld16s_i64: TODO(); --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611822800; cv=none; d=zohomail.com; s=zohoarc; b=X5I2Huta332t8FcchyEvKDBinGOkWckv6vviJtIaOwloKxk9tDImatzD7zfB6TivepyKPganMYb/35C2uPQJV1tDmz/IlRAw+C0oGB+/Fx+zlUXPm9WdGOBKc55hK/gAR8+YWnbNVNwTdrneYViI3P9Qmi5uev1ChptRBi9nWJM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611822800; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pvG/cWlHNORYY/HDoMp4ct94G02BusWJclWGSoO3BcE=; b=j+mM4X1x3qDsHr4TNdjBOjXvBlvPuCPp/PjmVLDX7/CPqDqMK6K2K0LeGOx01jXKvdvnhxgDiOeNSVReQ2Q0o4XIf8o9Y0w+1dwv674HOMlEIVv0ds+5l3i3iiXsyqLjQGim30jCPFXH+bMRghfVIxgpe81ch0jA5p4towP8is4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611822800462477.0289106396939; Thu, 28 Jan 2021 00:33:20 -0800 (PST) Received: from localhost ([::1]:50648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52jv-0006Gz-BK for importer@patchew.org; Thu, 28 Jan 2021 03:33:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52an-0005nx-T6 for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:53 -0500 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]:46577) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52al-0005hH-Qb for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:53 -0500 Received: by mail-pl1-x633.google.com with SMTP id u11so2899490plg.13 for ; Thu, 28 Jan 2021 00:23:51 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.23.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:23:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pvG/cWlHNORYY/HDoMp4ct94G02BusWJclWGSoO3BcE=; b=FTEEHUgfHOpGfzwwFKL1SZFEbxQK4HQb1w6Bgv9EeBogijn5m3CjOcqwO4SbBXfiNZ sou8XMrA4GumPlfG/zH/jtHShXqpq0vzvF8spuAjEFbTWPCZk2AwwWX06FcMAIoO+11K pr4EAkd2KMSYgn+c+j1rGev4Zr6vYvG5Z/+1MUje+Ra4Q4FZcQKt5WHnoK4ZSLyGPaHP yce0wEx5BLy8yUJGllJAThOc/xbJNyPWdbBaQ9cNvrmDaMpk2XjedhNxsfLuJbGyhRyH VMz8sh0aYNRKqJC07ZuyKBKeD3Z4iJi7soeD16iOgWxWFe68P4bzCwnZp5omEysHpvyK L7Cw== 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:mime-version:content-transfer-encoding; bh=pvG/cWlHNORYY/HDoMp4ct94G02BusWJclWGSoO3BcE=; b=kYGnWBt0AGRaJqCNZQqPZX1szuB9kTiEaLHz8L6HKmhWBDw2Vvbmx98vJZI0jicGGZ wUMcQziDQhNTgswBEFc9JfGLphk4vX8Cc5f8geSUlYdr4bYl5dwO2LPyXH5+UAd2Q33J 8Nhn83YAgZNaQt/vlS2yO0c/atUNeyoJEsjpyagdel17XFKxR6vATPoAzUa9NhdLLIQB 5m7vON1rJS7HIvTxFsOhTPvS2BU9IIjvY48uGjwebH13CsLAEmpdeR0Fk/an23Z+ElMi wA3yt8klK56BFOTwl8P76yhUL+GuFNDWQplywOtH/HpFf5fJYT9+gIkyIeaeUbomkxhi 5CNw== X-Gm-Message-State: AOAM532TSUJCc8X1irLforNqYapqocaZYlVycQ8fRktTOvcD/WnnUc3A l2NWlT33l4dSs2qiwPFdd32WHdtPV6Z6rU30 X-Google-Smtp-Source: ABdhPJzHcMXWQ8+F+PB3iCt99PrjT1lTeW++Jhd8kcxZcZIWiK2X+hJ/+SLx+Gukok42BkZ9ZpsFIw== X-Received: by 2002:a17:90a:4897:: with SMTP id b23mr10241787pjh.193.1611822230063; Thu, 28 Jan 2021 00:23:50 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 09/23] tcg/tci: Inline tci_write_reg32 into all callers Date: Wed, 27 Jan 2021 22:23:17 -1000 Message-Id: <20210128082331.196801-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" For a 64-bit TCI, the upper bits of a 32-bit operation are undefined (much like a native ppc64 32-bit operation). It simplifies everything if we don't force-extend the result. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 66 +++++++++++++++++++++++++------------------------------ 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 0b27f26cfb..f75971dd5e 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -115,12 +115,6 @@ tci_write_reg(tcg_target_ulong *regs, TCGReg index, tc= g_target_ulong value) regs[index] =3D value; } =20 -static void -tci_write_reg32(tcg_target_ulong *regs, TCGReg index, uint32_t value) -{ - tci_write_reg(regs, index, value); -} - #if TCG_TARGET_REG_BITS =3D=3D 32 static void tci_write_reg64(tcg_target_ulong *regs, uint32_t high_index, uint32_t low_index, uint64_t value) @@ -550,7 +544,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, t1 =3D tci_read_r32(regs, &tb_ptr); t2 =3D tci_read_ri32(regs, &tb_ptr); condition =3D *tb_ptr++; - tci_write_reg32(regs, t0, tci_compare32(t1, t2, condition)); + tci_write_reg(regs, t0, tci_compare32(t1, t2, condition)); break; #if TCG_TARGET_REG_BITS =3D=3D 32 case INDEX_op_setcond2_i32: @@ -558,7 +552,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, tmp64 =3D tci_read_r64(regs, &tb_ptr); v64 =3D tci_read_ri64(regs, &tb_ptr); condition =3D *tb_ptr++; - tci_write_reg32(regs, t0, tci_compare64(tmp64, v64, condition)= ); + tci_write_reg(regs, t0, tci_compare64(tmp64, v64, condition)); break; #elif TCG_TARGET_REG_BITS =3D=3D 64 case INDEX_op_setcond_i64: @@ -572,12 +566,12 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSt= ate *env, case INDEX_op_mov_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_r32(regs, &tb_ptr); - tci_write_reg32(regs, t0, t1); + tci_write_reg(regs, t0, t1); break; case INDEX_op_tci_movi_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_i32(&tb_ptr); - tci_write_reg32(regs, t0, t1); + tci_write_reg(regs, t0, t1); break; =20 /* Load/store operations (32 bit). */ @@ -604,7 +598,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, t0 =3D *tb_ptr++; t1 =3D tci_read_r(regs, &tb_ptr); t2 =3D tci_read_s32(&tb_ptr); - tci_write_reg32(regs, t0, *(uint32_t *)(t1 + t2)); + tci_write_reg(regs, t0, *(uint32_t *)(t1 + t2)); break; case INDEX_op_st8_i32: t0 =3D tci_read_r8(regs, &tb_ptr); @@ -632,44 +626,44 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSt= ate *env, t0 =3D *tb_ptr++; t1 =3D tci_read_ri32(regs, &tb_ptr); t2 =3D tci_read_ri32(regs, &tb_ptr); - tci_write_reg32(regs, t0, t1 + t2); + tci_write_reg(regs, t0, t1 + t2); break; case INDEX_op_sub_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_ri32(regs, &tb_ptr); t2 =3D tci_read_ri32(regs, &tb_ptr); - tci_write_reg32(regs, t0, t1 - t2); + tci_write_reg(regs, t0, t1 - t2); break; case INDEX_op_mul_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_ri32(regs, &tb_ptr); t2 =3D tci_read_ri32(regs, &tb_ptr); - tci_write_reg32(regs, t0, t1 * t2); + tci_write_reg(regs, t0, t1 * t2); break; #if TCG_TARGET_HAS_div_i32 case INDEX_op_div_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_ri32(regs, &tb_ptr); t2 =3D tci_read_ri32(regs, &tb_ptr); - tci_write_reg32(regs, t0, (int32_t)t1 / (int32_t)t2); + tci_write_reg(regs, t0, (int32_t)t1 / (int32_t)t2); break; case INDEX_op_divu_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_ri32(regs, &tb_ptr); t2 =3D tci_read_ri32(regs, &tb_ptr); - tci_write_reg32(regs, t0, t1 / t2); + tci_write_reg(regs, t0, t1 / t2); break; case INDEX_op_rem_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_ri32(regs, &tb_ptr); t2 =3D tci_read_ri32(regs, &tb_ptr); - tci_write_reg32(regs, t0, (int32_t)t1 % (int32_t)t2); + tci_write_reg(regs, t0, (int32_t)t1 % (int32_t)t2); break; case INDEX_op_remu_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_ri32(regs, &tb_ptr); t2 =3D tci_read_ri32(regs, &tb_ptr); - tci_write_reg32(regs, t0, t1 % t2); + tci_write_reg(regs, t0, t1 % t2); break; #elif TCG_TARGET_HAS_div2_i32 case INDEX_op_div2_i32: @@ -681,19 +675,19 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSt= ate *env, t0 =3D *tb_ptr++; t1 =3D tci_read_ri32(regs, &tb_ptr); t2 =3D tci_read_ri32(regs, &tb_ptr); - tci_write_reg32(regs, t0, t1 & t2); + tci_write_reg(regs, t0, t1 & t2); break; case INDEX_op_or_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_ri32(regs, &tb_ptr); t2 =3D tci_read_ri32(regs, &tb_ptr); - tci_write_reg32(regs, t0, t1 | t2); + tci_write_reg(regs, t0, t1 | t2); break; case INDEX_op_xor_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_ri32(regs, &tb_ptr); t2 =3D tci_read_ri32(regs, &tb_ptr); - tci_write_reg32(regs, t0, t1 ^ t2); + tci_write_reg(regs, t0, t1 ^ t2); break; =20 /* Shift/rotate operations (32 bit). */ @@ -702,32 +696,32 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSt= ate *env, t0 =3D *tb_ptr++; t1 =3D tci_read_ri32(regs, &tb_ptr); t2 =3D tci_read_ri32(regs, &tb_ptr); - tci_write_reg32(regs, t0, t1 << (t2 & 31)); + tci_write_reg(regs, t0, t1 << (t2 & 31)); break; case INDEX_op_shr_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_ri32(regs, &tb_ptr); t2 =3D tci_read_ri32(regs, &tb_ptr); - tci_write_reg32(regs, t0, t1 >> (t2 & 31)); + tci_write_reg(regs, t0, t1 >> (t2 & 31)); break; case INDEX_op_sar_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_ri32(regs, &tb_ptr); t2 =3D tci_read_ri32(regs, &tb_ptr); - tci_write_reg32(regs, t0, ((int32_t)t1 >> (t2 & 31))); + tci_write_reg(regs, t0, ((int32_t)t1 >> (t2 & 31))); break; #if TCG_TARGET_HAS_rot_i32 case INDEX_op_rotl_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_ri32(regs, &tb_ptr); t2 =3D tci_read_ri32(regs, &tb_ptr); - tci_write_reg32(regs, t0, rol32(t1, t2 & 31)); + tci_write_reg(regs, t0, rol32(t1, t2 & 31)); break; case INDEX_op_rotr_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_ri32(regs, &tb_ptr); t2 =3D tci_read_ri32(regs, &tb_ptr); - tci_write_reg32(regs, t0, ror32(t1, t2 & 31)); + tci_write_reg(regs, t0, ror32(t1, t2 & 31)); break; #endif #if TCG_TARGET_HAS_deposit_i32 @@ -738,7 +732,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, tmp16 =3D *tb_ptr++; tmp8 =3D *tb_ptr++; tmp32 =3D (((1 << tmp8) - 1) << tmp16); - tci_write_reg32(regs, t0, (t1 & ~tmp32) | ((t2 << tmp16) & tmp= 32)); + tci_write_reg(regs, t0, (t1 & ~tmp32) | ((t2 << tmp16) & tmp32= )); break; #endif case INDEX_op_brcond_i32: @@ -790,56 +784,56 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSt= ate *env, case INDEX_op_ext8s_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_r8s(regs, &tb_ptr); - tci_write_reg32(regs, t0, t1); + tci_write_reg(regs, t0, t1); break; #endif #if TCG_TARGET_HAS_ext16s_i32 case INDEX_op_ext16s_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_r16s(regs, &tb_ptr); - tci_write_reg32(regs, t0, t1); + tci_write_reg(regs, t0, t1); break; #endif #if TCG_TARGET_HAS_ext8u_i32 case INDEX_op_ext8u_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_r8(regs, &tb_ptr); - tci_write_reg32(regs, t0, t1); + tci_write_reg(regs, t0, t1); break; #endif #if TCG_TARGET_HAS_ext16u_i32 case INDEX_op_ext16u_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_r16(regs, &tb_ptr); - tci_write_reg32(regs, t0, t1); + tci_write_reg(regs, t0, t1); break; #endif #if TCG_TARGET_HAS_bswap16_i32 case INDEX_op_bswap16_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_r16(regs, &tb_ptr); - tci_write_reg32(regs, t0, bswap16(t1)); + tci_write_reg(regs, t0, bswap16(t1)); break; #endif #if TCG_TARGET_HAS_bswap32_i32 case INDEX_op_bswap32_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_r32(regs, &tb_ptr); - tci_write_reg32(regs, t0, bswap32(t1)); + tci_write_reg(regs, t0, bswap32(t1)); break; #endif #if TCG_TARGET_HAS_not_i32 case INDEX_op_not_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_r32(regs, &tb_ptr); - tci_write_reg32(regs, t0, ~t1); + tci_write_reg(regs, t0, ~t1); break; #endif #if TCG_TARGET_HAS_neg_i32 case INDEX_op_neg_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_r32(regs, &tb_ptr); - tci_write_reg32(regs, t0, -t1); + tci_write_reg(regs, t0, -t1); break; #endif #if TCG_TARGET_REG_BITS =3D=3D 64 @@ -881,7 +875,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, t0 =3D *tb_ptr++; t1 =3D tci_read_r(regs, &tb_ptr); t2 =3D tci_read_s32(&tb_ptr); - tci_write_reg32(regs, t0, *(uint32_t *)(t1 + t2)); + tci_write_reg(regs, t0, *(uint32_t *)(t1 + t2)); break; case INDEX_op_ld32s_i64: t0 =3D *tb_ptr++; --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611823136; cv=none; d=zohomail.com; s=zohoarc; b=VTQusRgFZ3oJcJ4lShhhuHHxaQgHiP1tdhu9b2kL/2NkaQZpfHypjcIG42MiTzFmJpf7ru6gd3VC7xsRUlAiceMIOCCKLvWbxvuFlT2+o7hphEryEY49KIT094nkfg8Psa5EAzK7FvJbjUihe5qSRbs2lpjnJ9L9kq9a6qfPQDo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611823136; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=VEiOGE+EQqPF+LmAYn7wD0yHzNXjUMhvxTllqm7GNvc=; b=Wk8WGH0fo33auqqCR+gPK4LxCckjIHlmbyA6FYpaQdYJeTuq8dre96ls+wmPBP9pmv7rgTZEIrfiaLMqWIa0eGTWXmtN103SvByK6ih7MtO4Sak+KDfX4Joj4IsO57BZopQ4FxnCruwzq1TM25g0NMX7jS4VkGGEanyHrHKGrSY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611823136358434.02424812889353; Thu, 28 Jan 2021 00:38:56 -0800 (PST) Received: from localhost ([::1]:38532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52pL-0004Zq-2Z for importer@patchew.org; Thu, 28 Jan 2021 03:38:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52ap-0005pu-1I for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:55 -0500 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:37357) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52am-0005hS-Vm for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:54 -0500 Received: by mail-pj1-x102a.google.com with SMTP id g15so3846493pjd.2 for ; Thu, 28 Jan 2021 00:23:52 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.23.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:23:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VEiOGE+EQqPF+LmAYn7wD0yHzNXjUMhvxTllqm7GNvc=; b=pxkU+Ise5uS9hgzG4A0gErR+GGdMs12g9w7fBS68cox4oDvjuqYvGqZs6KsWPyUd9z 1XER7yYxVt7n1DtE77KeoVIvqnTmK4h4p94hX4T3huGOXRMxX8lwfyKDs/RW+NVHPnxb IXt9ZiJaE4YzKpF/L7B5i9K+Xn8IvTPZuRjJjR8fv2KgWgcYVRkl9Bx1NN++Dcbe4/jJ hUcGPSAv3eZU1Wxu0gxLmX+Gt5prVwGtIiOMcfO6/O02a5acLB+xse3RfUBga5q6Odki Lx4o8rEccfr+t12TQdnihKqQ3wKXJI55OyWh6OWJAdPCmFdTzj2HDfvpztwrOXPtKMsA vY5g== 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:mime-version:content-transfer-encoding; bh=VEiOGE+EQqPF+LmAYn7wD0yHzNXjUMhvxTllqm7GNvc=; b=S52CgAlsOQWnN0AfmWxCNmbrGxrZKniLgLKYlmHFrA4E+ydEn+ZYtKaTCll25dxAGz eOIQqpe9iVC4/GC5pp3fB3+UCdXl/Ult4jVBa8l+O+26Qa87MyBovysqgGzY5mVz74iE iusAATFWjQTyUEpfg5sN4g4HupJvPjOIhXGIffXwHmelz/HklUpcaAuDLEoOsjnYSHpk v5CfcLTQxGn8xIlOUF98+hsQmi2vJUAxTGOKyiDKTd/NXhjiHXNQ7G/5eSpnConzrLj9 awMLx2FBDcnlJ+NhWcXnvtEi587yD9pLvF2f4kRBmdOJgV0/weFus99keXo2HCtqm0Gk ScyA== X-Gm-Message-State: AOAM530XyiaBMz/xrE+7UBgLk+k2wBNk8eKZeF8oWc3+QyJDXhA3WfuH AfRs4UVDRF7nSEjde05cCaKQnf7SA+o6znQA X-Google-Smtp-Source: ABdhPJx1Wn7e5SMgQo5R6B20WNTRMo/JGNLqT5Y6VHixFY6n1SLsu4SgrJXsU2Nr6k7Vjb56ohBdOg== X-Received: by 2002:a17:90b:4acd:: with SMTP id mh13mr10074103pjb.229.1611822231718; Thu, 28 Jan 2021 00:23:51 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 10/23] tcg/tci: Inline tci_write_reg64 into 64-bit callers Date: Wed, 27 Jan 2021 22:23:18 -1000 Message-Id: <20210128082331.196801-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Note that we had two functions of the same name: a 32-bit version which took two register numbers and a 64-bit version which was a no-op wrapper for tcg_write_reg. After this, we are left with only the 32-bit version. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 60 +++++++++++++++++++++++++------------------------------ 1 file changed, 27 insertions(+), 33 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index f75971dd5e..864771d91b 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -122,12 +122,6 @@ static void tci_write_reg64(tcg_target_ulong *regs, ui= nt32_t high_index, tci_write_reg(regs, low_index, value); tci_write_reg(regs, high_index, value >> 32); } -#elif TCG_TARGET_REG_BITS =3D=3D 64 -static void -tci_write_reg64(tcg_target_ulong *regs, TCGReg index, uint64_t value) -{ - tci_write_reg(regs, index, value); -} #endif =20 #if TCG_TARGET_REG_BITS =3D=3D 32 @@ -560,7 +554,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, t1 =3D tci_read_r64(regs, &tb_ptr); t2 =3D tci_read_ri64(regs, &tb_ptr); condition =3D *tb_ptr++; - tci_write_reg64(regs, t0, tci_compare64(t1, t2, condition)); + tci_write_reg(regs, t0, tci_compare64(t1, t2, condition)); break; #endif case INDEX_op_mov_i32: @@ -840,12 +834,12 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSt= ate *env, case INDEX_op_mov_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r64(regs, &tb_ptr); - tci_write_reg64(regs, t0, t1); + tci_write_reg(regs, t0, t1); break; case INDEX_op_tci_movi_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_i64(&tb_ptr); - tci_write_reg64(regs, t0, t1); + tci_write_reg(regs, t0, t1); break; =20 /* Load/store operations (64 bit). */ @@ -887,7 +881,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, t0 =3D *tb_ptr++; t1 =3D tci_read_r(regs, &tb_ptr); t2 =3D tci_read_s32(&tb_ptr); - tci_write_reg64(regs, t0, *(uint64_t *)(t1 + t2)); + tci_write_reg(regs, t0, *(uint64_t *)(t1 + t2)); break; case INDEX_op_st8_i64: t0 =3D tci_read_r8(regs, &tb_ptr); @@ -921,19 +915,19 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSt= ate *env, t0 =3D *tb_ptr++; t1 =3D tci_read_ri64(regs, &tb_ptr); t2 =3D tci_read_ri64(regs, &tb_ptr); - tci_write_reg64(regs, t0, t1 + t2); + tci_write_reg(regs, t0, t1 + t2); break; case INDEX_op_sub_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_ri64(regs, &tb_ptr); t2 =3D tci_read_ri64(regs, &tb_ptr); - tci_write_reg64(regs, t0, t1 - t2); + tci_write_reg(regs, t0, t1 - t2); break; case INDEX_op_mul_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_ri64(regs, &tb_ptr); t2 =3D tci_read_ri64(regs, &tb_ptr); - tci_write_reg64(regs, t0, t1 * t2); + tci_write_reg(regs, t0, t1 * t2); break; #if TCG_TARGET_HAS_div_i64 case INDEX_op_div_i64: @@ -952,19 +946,19 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSt= ate *env, t0 =3D *tb_ptr++; t1 =3D tci_read_ri64(regs, &tb_ptr); t2 =3D tci_read_ri64(regs, &tb_ptr); - tci_write_reg64(regs, t0, t1 & t2); + tci_write_reg(regs, t0, t1 & t2); break; case INDEX_op_or_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_ri64(regs, &tb_ptr); t2 =3D tci_read_ri64(regs, &tb_ptr); - tci_write_reg64(regs, t0, t1 | t2); + tci_write_reg(regs, t0, t1 | t2); break; case INDEX_op_xor_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_ri64(regs, &tb_ptr); t2 =3D tci_read_ri64(regs, &tb_ptr); - tci_write_reg64(regs, t0, t1 ^ t2); + tci_write_reg(regs, t0, t1 ^ t2); break; =20 /* Shift/rotate operations (64 bit). */ @@ -973,32 +967,32 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSt= ate *env, t0 =3D *tb_ptr++; t1 =3D tci_read_ri64(regs, &tb_ptr); t2 =3D tci_read_ri64(regs, &tb_ptr); - tci_write_reg64(regs, t0, t1 << (t2 & 63)); + tci_write_reg(regs, t0, t1 << (t2 & 63)); break; case INDEX_op_shr_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_ri64(regs, &tb_ptr); t2 =3D tci_read_ri64(regs, &tb_ptr); - tci_write_reg64(regs, t0, t1 >> (t2 & 63)); + tci_write_reg(regs, t0, t1 >> (t2 & 63)); break; case INDEX_op_sar_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_ri64(regs, &tb_ptr); t2 =3D tci_read_ri64(regs, &tb_ptr); - tci_write_reg64(regs, t0, ((int64_t)t1 >> (t2 & 63))); + tci_write_reg(regs, t0, ((int64_t)t1 >> (t2 & 63))); break; #if TCG_TARGET_HAS_rot_i64 case INDEX_op_rotl_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_ri64(regs, &tb_ptr); t2 =3D tci_read_ri64(regs, &tb_ptr); - tci_write_reg64(regs, t0, rol64(t1, t2 & 63)); + tci_write_reg(regs, t0, rol64(t1, t2 & 63)); break; case INDEX_op_rotr_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_ri64(regs, &tb_ptr); t2 =3D tci_read_ri64(regs, &tb_ptr); - tci_write_reg64(regs, t0, ror64(t1, t2 & 63)); + tci_write_reg(regs, t0, ror64(t1, t2 & 63)); break; #endif #if TCG_TARGET_HAS_deposit_i64 @@ -1009,7 +1003,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSt= ate *env, tmp16 =3D *tb_ptr++; tmp8 =3D *tb_ptr++; tmp64 =3D (((1ULL << tmp8) - 1) << tmp16); - tci_write_reg64(regs, t0, (t1 & ~tmp64) | ((t2 << tmp16) & tmp= 64)); + tci_write_reg(regs, t0, (t1 & ~tmp64) | ((t2 << tmp16) & tmp64= )); break; #endif case INDEX_op_brcond_i64: @@ -1027,28 +1021,28 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArch= State *env, case INDEX_op_ext8u_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r8(regs, &tb_ptr); - tci_write_reg64(regs, t0, t1); + tci_write_reg(regs, t0, t1); break; #endif #if TCG_TARGET_HAS_ext8s_i64 case INDEX_op_ext8s_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r8s(regs, &tb_ptr); - tci_write_reg64(regs, t0, t1); + tci_write_reg(regs, t0, t1); break; #endif #if TCG_TARGET_HAS_ext16s_i64 case INDEX_op_ext16s_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r16s(regs, &tb_ptr); - tci_write_reg64(regs, t0, t1); + tci_write_reg(regs, t0, t1); break; #endif #if TCG_TARGET_HAS_ext16u_i64 case INDEX_op_ext16u_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r16(regs, &tb_ptr); - tci_write_reg64(regs, t0, t1); + tci_write_reg(regs, t0, t1); break; #endif #if TCG_TARGET_HAS_ext32s_i64 @@ -1057,7 +1051,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSt= ate *env, case INDEX_op_ext_i32_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r32s(regs, &tb_ptr); - tci_write_reg64(regs, t0, t1); + tci_write_reg(regs, t0, t1); break; #if TCG_TARGET_HAS_ext32u_i64 case INDEX_op_ext32u_i64: @@ -1065,41 +1059,41 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArch= State *env, case INDEX_op_extu_i32_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r32(regs, &tb_ptr); - tci_write_reg64(regs, t0, t1); + tci_write_reg(regs, t0, t1); break; #if TCG_TARGET_HAS_bswap16_i64 case INDEX_op_bswap16_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r16(regs, &tb_ptr); - tci_write_reg64(regs, t0, bswap16(t1)); + tci_write_reg(regs, t0, bswap16(t1)); break; #endif #if TCG_TARGET_HAS_bswap32_i64 case INDEX_op_bswap32_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r32(regs, &tb_ptr); - tci_write_reg64(regs, t0, bswap32(t1)); + tci_write_reg(regs, t0, bswap32(t1)); break; #endif #if TCG_TARGET_HAS_bswap64_i64 case INDEX_op_bswap64_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r64(regs, &tb_ptr); - tci_write_reg64(regs, t0, bswap64(t1)); + tci_write_reg(regs, t0, bswap64(t1)); break; #endif #if TCG_TARGET_HAS_not_i64 case INDEX_op_not_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r64(regs, &tb_ptr); - tci_write_reg64(regs, t0, ~t1); + tci_write_reg(regs, t0, ~t1); break; #endif #if TCG_TARGET_HAS_neg_i64 case INDEX_op_neg_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r64(regs, &tb_ptr); - tci_write_reg64(regs, t0, -t1); + tci_write_reg(regs, t0, -t1); break; #endif #endif /* TCG_TARGET_REG_BITS =3D=3D 64 */ --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611822800; cv=none; d=zohomail.com; s=zohoarc; b=BtgPXOVYWsg6ywAmpoUf3OTYxRt5JyiMWRqivwuau7ulOnWw2Isig0h0DXbaSAvuAqvw56+55DZeD4Lhv09vh1CLzkelA0uQuRo9FqCUX2/vsCtSGBs3cO8tXImX5quOuKXjSMavvkqc4yIwqo6pmGNJDxdBWUGEWKNxf2CxbQk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611822800; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+gLPw/1CU8EEcg4ft9K8sRZ82WZkVlXHcJTnm9slh4g=; b=f/d6xqFuFdO9yMOdVNp7gC3i+z0XU+cmsx0cV8yzObtT5cyaYa5KNV0xaLiUraX7eSmY+P0Nst/sXZL0OQGlcQIzBUuRnK0S6/DM0aBdbWb/jnvGnMCeEm3YWJ3dD/PkEi5T4QHFI+KpXgincOzSafnfGJD0bCCVMwVf2Um2spg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16118228002881005.8782055817533; Thu, 28 Jan 2021 00:33:20 -0800 (PST) Received: from localhost ([::1]:50706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52jv-0006IU-5N for importer@patchew.org; Thu, 28 Jan 2021 03:33:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52ap-0005ry-R4 for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:55 -0500 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]:35843) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52ao-0005iU-9E for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:55 -0500 Received: by mail-pl1-x633.google.com with SMTP id e9so2926648plh.3 for ; Thu, 28 Jan 2021 00:23:53 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:23:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+gLPw/1CU8EEcg4ft9K8sRZ82WZkVlXHcJTnm9slh4g=; b=JZK9Zfv0J3LeSKqL81qqMZh/1kx6BCi7wOILxFCuob+udxHabsEWf33RG5aOLZRk1t CJD5RhVPgv1NENrdPmmPpQ59upMU7meX9Oo+PiuuVcyEOKLePPDOMH4pPYgacfFpjM8L 7sFTAe7B0CvFM3c0ek12c++eIKNeWfl1TvVjTjJUGLcMujA92oNHUal+mSA+Ebtq7XAe QyITUw63l6NNBWqQfIk6q+CZK349GxsTGenlar4cdkx5R/j5y7yV8PiBfSVVeI0b/HHN SEJ2WLXe18KMyCmER3eHvCvD6qg5J71vJ9E2f+msIwLgGTIDFpcGNmr3FbdnAROxHmJ6 a4XA== 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:mime-version:content-transfer-encoding; bh=+gLPw/1CU8EEcg4ft9K8sRZ82WZkVlXHcJTnm9slh4g=; b=b01SG9g+RD9QKjHtGqWTSsEYeSn/OguqVzDNXf/CvpsoFE5WMWm6ZZIC32XHMnec+d bTlaK/0xmhrLP+ifO23F1yIfiE1tIxU6zrr66OifGqqdSJ879mr/bx4Iwl2vf7Wjle7V B8ydcuwZclmxIOS70KILAezf8S6nWbGSCv7fv54b9BLuH1OmAAD64IIn/Ig1V1hsPlfA c+sLl3VwdZfINNRyVyRAYVo2a/ZFXfnOrCoQsILErh3it9xHGUR1ofDOcQ/mRjq78RO/ y9errBuER8cKpvAI4gfv/x4LlpoIdHf5WHXC3ZPfP3SfLD++Wb3msIHcqniNwmCzMl2+ tNFQ== X-Gm-Message-State: AOAM533NsXZc5zRNmE845gy7DMh4Dwdf9Q0XUDpgfzSw4cH/a4lugq4t zsgoEhRiTbkiXCP9UnuVBBaAXNADFbc0N4Iy X-Google-Smtp-Source: ABdhPJycnI8oOxSVa38JTY5+mQdsu/iMmGTk7mgVpia7p6eWTkJT1/Vj8sXk99jJ52VHUskYaTvDpA== X-Received: by 2002:a17:90a:5b05:: with SMTP id o5mr9909946pji.109.1611822233111; Thu, 28 Jan 2021 00:23:53 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 11/23] tcg/tci: Merge INDEX_op_ld8u_{i32,i64} Date: Wed, 27 Jan 2021 22:23:19 -1000 Message-Id: <20210128082331.196801-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 864771d91b..019035d52f 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -571,6 +571,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, /* Load/store operations (32 bit). */ =20 case INDEX_op_ld8u_i32: + case INDEX_op_ld8u_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r(regs, &tb_ptr); t2 =3D tci_read_s32(&tb_ptr); @@ -844,12 +845,6 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSta= te *env, =20 /* Load/store operations (64 bit). */ =20 - case INDEX_op_ld8u_i64: - t0 =3D *tb_ptr++; - t1 =3D tci_read_r(regs, &tb_ptr); - t2 =3D tci_read_s32(&tb_ptr); - tci_write_reg(regs, t0, *(uint8_t *)(t1 + t2)); - break; case INDEX_op_ld8s_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r(regs, &tb_ptr); --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611823294; cv=none; d=zohomail.com; s=zohoarc; b=HJFII9x17+CaZHhMP/UniNZBRrQ5LqPlLgl4hSgkWM4a2Z1IUnexdJn2/ZUAJdPSqmBj+TOiWdCUpgIIWDMTObcqKw4QmgOAi7yl3wG+Vuz1YJoiFWWGGTeTaJqQ9CdidoYPt4BgV/PBjTz+tyitabh/miqu2KXUwHHsv9pzMdg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611823294; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lFaT0dC4rp7zkvcUUlivssdk4QAkUEVBjOL/yrkJyPY=; b=eFCbXZa5Ez2hnZ3PNT2ooL1EwjI2qmUrnCj1f2WGkJ0qJ5qLLXZK3RTF/qf+2yMWZhp+6/45wYmZJBtpNBTiDP/gdd8Q01YcPCMqNiEYe5kqcaL+NtCcXeRTJ4ZmXHSmlFFwUWr91NP/0WPeAqJ4fSwCUuUqn+JDmN2BRXLy5JQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611823294390938.318367060256; Thu, 28 Jan 2021 00:41:34 -0800 (PST) Received: from localhost ([::1]:45482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52rt-0007av-AV for importer@patchew.org; Thu, 28 Jan 2021 03:41:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52ar-0005vH-HC for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:57 -0500 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]:45857) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52ap-0005ii-S7 for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:57 -0500 Received: by mail-pg1-x536.google.com with SMTP id v19so3783826pgj.12 for ; Thu, 28 Jan 2021 00:23:55 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.23.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:23:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lFaT0dC4rp7zkvcUUlivssdk4QAkUEVBjOL/yrkJyPY=; b=LHHgzj0j5lmqz+2Y0Vn8VC1ne+svugTSM2hOvOrSbuV3MrYqrKF2fdq3Enm53hf29U /BGuxQn0kXvElEL9f+zaouX5tsHk+ugZ81IneqIu2GRZCXZkf/4EBqsupfJNpeSHHfIF ahF88gHF+RCAeOmbtpcTTOOImdHq1YznRQYXqJXm2K38r+zVC661+gybrSWAP2AQRXW+ SFm2DsF98n8ifAVSpm8X+85ulAofQxy7Vd6MnOZlmvi3DOms21CITXBF9p/rPhEJiWdN E5uyP1StOb6UhM05EByGUYl1a1JWf6UAFlSWdm94ESrZp9lrBraseRZIeHFIstBuITut pzsA== 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:mime-version:content-transfer-encoding; bh=lFaT0dC4rp7zkvcUUlivssdk4QAkUEVBjOL/yrkJyPY=; b=POIkZTW4Ym34eqBKzRUDJtFzVQ1xNQZmIYYt32+jwup8+Zcpc8fMwHGwH9uiXnTVzt CD0cYIvLXN3yCoRGmWZOFk0b8HEl/spQyV+AuA22+7BYqswQonyVsAnaebSQ5cHXiHU3 KbwH8iIALqf3Bb1SIq55cd0wofXoKq1kMHUjstH0u0qKIy0ZufjrcH7t/hZziCz2MEd5 OrLDsCBIZtxqGetvmj6xoR1zFNYpiltf9Nu1JJo5ymNb/TjQfsai+hh6YgQY+w5UGs2D btjZFV0HkojhZxME8bL50LO+mG51YuKbG2S9X5pL6RFrx0P8XNue66ato/P4H8zrv9Yn 9diQ== X-Gm-Message-State: AOAM532QoNWXQNY2tiRw+L6JKo+zlwas/1dChVWlElJP4gSZkitF+X0H FIXHMi6GYPA6qhmAAehefxUmUZI1Y8qtL5vf X-Google-Smtp-Source: ABdhPJzbmxM5sywUgN5cEQA0edHyK9xSeWAiunIn861137RuV4AiK9yp97W+ZuF+3lyPr9PDdFt+GA== X-Received: by 2002:a65:58c4:: with SMTP id e4mr12106867pgu.151.1611822234551; Thu, 28 Jan 2021 00:23:54 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 12/23] tcg/tci: Merge INDEX_op_ld8s_{i32,i64} Date: Wed, 27 Jan 2021 22:23:20 -1000 Message-Id: <20210128082331.196801-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x536.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Eliminating a TODO for ld8s_i32. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 019035d52f..7d11982eb2 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -578,7 +578,11 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSta= te *env, tci_write_reg(regs, t0, *(uint8_t *)(t1 + t2)); break; case INDEX_op_ld8s_i32: - TODO(); + case INDEX_op_ld8s_i64: + t0 =3D *tb_ptr++; + t1 =3D tci_read_r(regs, &tb_ptr); + t2 =3D tci_read_s32(&tb_ptr); + tci_write_reg(regs, t0, *(int8_t *)(t1 + t2)); break; case INDEX_op_ld16u_i32: TODO(); @@ -845,12 +849,6 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSta= te *env, =20 /* Load/store operations (64 bit). */ =20 - case INDEX_op_ld8s_i64: - t0 =3D *tb_ptr++; - t1 =3D tci_read_r(regs, &tb_ptr); - t2 =3D tci_read_s32(&tb_ptr); - tci_write_reg(regs, t0, *(int8_t *)(t1 + t2)); - break; case INDEX_op_ld16u_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r(regs, &tb_ptr); --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611823002; cv=none; d=zohomail.com; s=zohoarc; b=Ygc3f2g1DD4fpA5sCA+3HdwyLiwnM3T7TAl25CJUE8CY1ltEUdPmRlONvlQBTTvTBNIdELlpqvYv8pi1o08r04hueHmnfLVrZQINzMoVnXmaBaXkXJVlx9YDkLiB2V6alVVPOEGXu5r10dpANMujtFOCNDm1Tz4yJzz8BrKmaKs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611823002; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hRd34LGil31wVPd8eDU4MGOPOaZrbwDGq6Woxhcr11M=; b=Y1pmGoxyTqPci3ZC33YzSSce6kj9Gi6VADRsUip9wYHtphqxDkwqKXRm24jVhWbLyZ9HAQ2IhjKfZ4iH+6gTvNdia923cNX6H1Ti+pc6NKxVXidjHq5vPc8IePY/1m5O83joQtzyPFq8A6VdkqfQVvbzNsWSof8m01qqg8JcXgk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611823002268596.9230138432861; Thu, 28 Jan 2021 00:36:42 -0800 (PST) Received: from localhost ([::1]:59252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52nB-0001L4-4G for importer@patchew.org; Thu, 28 Jan 2021 03:36:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52as-0005zE-Tt for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:58 -0500 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:44116) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52ar-0005is-CF for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:23:58 -0500 Received: by mail-pg1-x530.google.com with SMTP id s23so2527598pgh.11 for ; Thu, 28 Jan 2021 00:23:56 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.23.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:23:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hRd34LGil31wVPd8eDU4MGOPOaZrbwDGq6Woxhcr11M=; b=W0WQfTedontnwR/hqHUVDWqXb3UJTt03lxP8AVnBAQOlqBfiZSRvsG5ImpETyrZeVC 7+E3NOsljg6Wg78OuiK0IMLVdIkXuF6egPYZePNcH/mLjtPMnB3KTn6shOvAsCLxjcvU FXjK/L+N79I5PVawSOfYYAEdEeAq5nYVNteBLvn99C6qU8xyZawhmym/OIuXKqKcHk5x dnQsCw8Qd7xNTETJEPENyQwOheHlYq1cfjvGsH4d2A7MMp7jGRM9vWw2gyLx91SFIRws u6V/Y1fxTYBqoE2por6HSetJf/WNj8SENMlJ1huWKbZ4eoo917HB+89M7u35zx+nrnmy dtwA== 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:mime-version:content-transfer-encoding; bh=hRd34LGil31wVPd8eDU4MGOPOaZrbwDGq6Woxhcr11M=; b=rHTz24wEd15kuIclZ3tXvoXib7KZkeuvg2an1m7achHEjULRZKKmZUiD/yL0kqmsuG I0Tgi4Aua5Q72k/SvBTPy+ZJpnketpJXwMuuMml9SdbV3hk5qqGPTGyodlN4qz3PtGFO M5ljxxTIB6jfEEBA8ShhpqG6nXLRgyhNlDo1GAsqozP5emDPmimhA0JdOinPvCQV6wzA CJGwAd08kptU6/bxEH+ddOOTVXdo24Hjy0QTjc2NoAMXP8zwyqV8i3mBPTTy1hvv2cuN eYGjZTTeprZnwRJUd5RcmFLZlfbMjw983Wq6Vm+Ut9qz3jHhjIbb2iNsQEtIEItqXsBO d+zA== X-Gm-Message-State: AOAM530nK/Rl9m67o0U/vA63CpCJBF8pOelgZZ0atWxbwc43T0Dbp+kd z9kgO8KHArIVg6Mhm5pshZGbsxwaj3W7lRAj X-Google-Smtp-Source: ABdhPJzqLbLWP1pS5WHq6VZnU0cboLF2z2HU0a//EL17Tc0YxNjTGeJ/irjDA122RjeKWcGNk8AZ5Q== X-Received: by 2002:aa7:8ed2:0:b029:1b9:7c87:8f44 with SMTP id b18-20020aa78ed20000b02901b97c878f44mr14942375pfr.49.1611822236134; Thu, 28 Jan 2021 00:23:56 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 13/23] tcg/tci: Merge INDEX_op_ld16u_{i32,i64} Date: Wed, 27 Jan 2021 22:23:21 -1000 Message-Id: <20210128082331.196801-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Eliminating a TODO for ld16u_i32. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 7d11982eb2..d197803dca 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -585,7 +585,11 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSta= te *env, tci_write_reg(regs, t0, *(int8_t *)(t1 + t2)); break; case INDEX_op_ld16u_i32: - TODO(); + case INDEX_op_ld16u_i64: + t0 =3D *tb_ptr++; + t1 =3D tci_read_r(regs, &tb_ptr); + t2 =3D tci_read_s32(&tb_ptr); + tci_write_reg(regs, t0, *(uint16_t *)(t1 + t2)); break; case INDEX_op_ld16s_i32: t0 =3D *tb_ptr++; @@ -849,12 +853,6 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSta= te *env, =20 /* Load/store operations (64 bit). */ =20 - case INDEX_op_ld16u_i64: - t0 =3D *tb_ptr++; - t1 =3D tci_read_r(regs, &tb_ptr); - t2 =3D tci_read_s32(&tb_ptr); - tci_write_reg(regs, t0, *(uint16_t *)(t1 + t2)); - break; case INDEX_op_ld16s_i64: TODO(); break; --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611823457; cv=none; d=zohomail.com; s=zohoarc; b=G08pNIW3RqA6TtVZK9vzJ8VsRwrl6BqAVx3+bP2n9HfI6iQQjYl19/day17FDyieJAIkmXfYSAklE7eMWGZKZ/aAFV3wmamIpkCxIiFZj0RDdfXdRNo6e/DqK7sazuG3ifoXF9zvTclTrO8YD5DE0NmpBi2U/E6ebR/po7qPISU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611823457; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Q83BJIWsR5r5VZKO+D5Uu4FbRZzfyeYfyyPPiEe0tU8=; b=SpgaJp6tRSvr11+YYLi+pSJvOEhmouZ9/jQHVBD6x87J5Z+i2ijQokPIy4mrZljfzPevQjkbJrO0CNuhb5/bnqpxcg+z+y+jqev8OB3JY/2DaYVSnp+mFLQUaHevlSSbNy7Q9gyPGchJITm1rTBBYFnCuyS3UeIVJFRbIncWekw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611823457400723.2048782472554; Thu, 28 Jan 2021 00:44:17 -0800 (PST) Received: from localhost ([::1]:51378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52uW-0001g8-0U for importer@patchew.org; Thu, 28 Jan 2021 03:44:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52au-000649-Mo for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:00 -0500 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:46887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52as-0005jm-Qr for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:00 -0500 Received: by mail-pf1-x432.google.com with SMTP id f63so3502936pfa.13 for ; Thu, 28 Jan 2021 00:23:58 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.23.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:23:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q83BJIWsR5r5VZKO+D5Uu4FbRZzfyeYfyyPPiEe0tU8=; b=y1Nc7WCPgq7XiXpeiGkA6A5R24yythycob6a7aEnW/+9eKYqmu2Y8hSQ8JxiRqN/wQ DvhYy/Z1L6byGKTa47ucjHAJ84zrc1RHH7TXGl6MEoCflHEnf4KXvYIyYXyGx7LhMRY6 CML/qKpmPPP/xbiO/Dbm13kX0RoS4Q/0uLi1ZgorYOBf657ur26Z5EnPm8MFCz3l7mNX 6iHqOotGkf3EQW3GeRmQg1zujRtwmp3XtHnpAAgdE7Tj+5Z1id2yI+fFBpnzMLC02lUl Galc2UoYlH0dwEHv5GpjRJptCbxaimkIxpDRPRVRKUJPBIABR3IZjdnOhIqQfYU3t5aA qdnQ== 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:mime-version:content-transfer-encoding; bh=Q83BJIWsR5r5VZKO+D5Uu4FbRZzfyeYfyyPPiEe0tU8=; b=akWz2xiTmgTS4CVw3ilhKZY9Jeu/cLu/rEY73p7yuOoukg0P53nVDTYicJ+6m2CYlf VhPLR0EfK19ofNC52pDUvC2sLYZDUtS48QMGPVFomgljmOVMLIZ62kKSm8Uj3rdzVA8I 36RUYwZGmh16gMWiN0CIHpK4v5aN5PJhd3vnhsibZ3H6mdbonecjMZrwVHlKHcdXAx3C ardGNHOZTeLuXz+3pSFHou9KyEAw5LTXC9B2JVO0qNWFbpy6KS4WvxXgTZqZCMUt7n5l blj8gtkvXgMBN49GAEDleZTGBVEePYIW0JFCGkBXFC9LH34QoTZNO56jhXxygwC2cKEq aWFw== X-Gm-Message-State: AOAM531G6u/vmbDuyWm0s8BcUBvEGlp/z/+D29CBdMozbarRdKYlBx9N 0VB8hPoeG9j6CkV6BtBQUBwkbKgpQQtdGZ0E X-Google-Smtp-Source: ABdhPJwYMj8qCqAsB1ApuvM6h163JJnofynMxFbk0oiNV8YPrcEaYXX3e3TNSTHoyQobhu7s4mVTWw== X-Received: by 2002:a63:1f21:: with SMTP id f33mr15652649pgf.31.1611822237602; Thu, 28 Jan 2021 00:23:57 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 14/23] tcg/tci: Merge INDEX_op_ld16s_{i32,i64} Date: Wed, 27 Jan 2021 22:23:22 -1000 Message-Id: <20210128082331.196801-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Eliminating a TODO for ld16s_i64. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index d197803dca..95625701bb 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -592,6 +592,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, tci_write_reg(regs, t0, *(uint16_t *)(t1 + t2)); break; case INDEX_op_ld16s_i32: + case INDEX_op_ld16s_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r(regs, &tb_ptr); t2 =3D tci_read_s32(&tb_ptr); @@ -853,9 +854,6 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, =20 /* Load/store operations (64 bit). */ =20 - case INDEX_op_ld16s_i64: - TODO(); - break; case INDEX_op_ld32u_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r(regs, &tb_ptr); --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611823609; cv=none; d=zohomail.com; s=zohoarc; b=d+ZAF9t0jeUj16Zg9vEfGvM3jOrIRta4TB/X7BFziiEKZnqZRwfS8o9DDokHkWB1dZd1uGt7hQ82dWZ0B7BUEBu4SmHqNhdW7ZW2Hk6pkg4EdjSYspAG47gPzx5SzRXXYCgmm60GKoS8zFFz25ystYDVoUk6ag2lMq469vvi6Fo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611823609; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rBCcLumWniM/+fC/4eU8EcpSrpup7jHrRf0ZPnvW8R4=; b=T7nmGjSjpHrQVF+NCc4unD7m5E8x0qb2ZVpCUMK8A5BJaazi+kjQO6xlObmOy3Cn4km3qu3tbxlCh/cnaN5I5G1P7MZ+mfIzozQVq+7uXTIAS7oKDCY7WSbB8LqNnxipgmMptZnxp3/3xDlvZ2ipsZzjjGzuFFmCTjBjIbNJHc4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611823609571703.0838350026486; Thu, 28 Jan 2021 00:46:49 -0800 (PST) Received: from localhost ([::1]:56160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52wy-0003vP-CU for importer@patchew.org; Thu, 28 Jan 2021 03:46:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54520) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52aw-00067P-41 for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:02 -0500 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:38760) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52au-0005k2-E7 for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:01 -0500 Received: by mail-pj1-x102d.google.com with SMTP id l18so3842868pji.3 for ; Thu, 28 Jan 2021 00:24:00 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.23.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:23:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rBCcLumWniM/+fC/4eU8EcpSrpup7jHrRf0ZPnvW8R4=; b=D9HkyJHDcvgt5VK74A91d6+cya1fsnZWcXymNGtaLkzY0M6Cn74jSvxiN2zdLX+GSM q1YtfD9VUa70kJ1KdTmAqZTuqMKyTHhWJHFq4igSKCL2xDQJTVCCOpBf3EIUQkejE49C ReGb5o0OYeDuM+YJmcfoQ0HYhEVtboNk7fzMCq8ots6SDz64EkSwkIOOk5lv9VcfSOAr Z4FBgvhfbc1fMWdBfrd7rzzyOUUv0wx/y46NlDpqdbhTpTgVb28ffVZYMyoZGYyEujh2 86+3WZCvtx5Cy7GkrSMiyU2SboApjJ0N2OhB0s0qnKH4SgW2e2gX5vFqDkoV4FdjiEYo vIeA== 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:mime-version:content-transfer-encoding; bh=rBCcLumWniM/+fC/4eU8EcpSrpup7jHrRf0ZPnvW8R4=; b=bzOefwGgYjB+nka4B7eUmuoXE1qFE1dX2AHsO86T8kBfWR4nDu0aSM4E8MahdvSuIv IxpRSbcYekQwMkQpVNCUoYeA1r58NWEa+Jo7wcc+kupTBczZIouFZASXn4jxkX2qQrPd mBprxdV4pf2O5g6zyUTkcjxhY8PenyPSsfPxet1gm/B5jATMRLNhP1atDKMm+iyvoMGC 33npcJpCEy7dMpl9GiMZ8vvqLTB2wRFYZTlMT0OpgNlqApIwd8jsR3eFlyBFeqWB/o+o JyJkPMwRDQ2sbn+bUXCULHHSjkADGdEZ3qZ2HlvsvXUQgVc3xjp15o5ZsYk2UurY4CRK WIvA== X-Gm-Message-State: AOAM530cv3Oktx71KJ+qJMnqIHpzBW+zYakQRxBHnBtEBiNQBBOvVOPu CufNuTNsIpovoFa6PJs1MpnTztwiCFtCDGe3 X-Google-Smtp-Source: ABdhPJxtTBeyft05D4ocXveZUOU+6bQEx2WKOMolnpwtkYm018PTL8flQWnrotn+PwvDjCP8CABD0A== X-Received: by 2002:a17:90a:7e8d:: with SMTP id j13mr10042480pjl.37.1611822239151; Thu, 28 Jan 2021 00:23:59 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 15/23] tcg/tci: Merge INDEX_op_{ld_i32,ld32u_i64} Date: Wed, 27 Jan 2021 22:23:23 -1000 Message-Id: <20210128082331.196801-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 95625701bb..233fc0604e 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -599,6 +599,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, tci_write_reg(regs, t0, *(int16_t *)(t1 + t2)); break; case INDEX_op_ld_i32: + case INDEX_op_ld32u_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r(regs, &tb_ptr); t2 =3D tci_read_s32(&tb_ptr); @@ -854,12 +855,6 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSta= te *env, =20 /* Load/store operations (64 bit). */ =20 - case INDEX_op_ld32u_i64: - t0 =3D *tb_ptr++; - t1 =3D tci_read_r(regs, &tb_ptr); - t2 =3D tci_read_s32(&tb_ptr); - tci_write_reg(regs, t0, *(uint32_t *)(t1 + t2)); - break; case INDEX_op_ld32s_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_r(regs, &tb_ptr); --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611822553; cv=none; d=zohomail.com; s=zohoarc; b=SD9+L+wbOLZ81UGM0aT2YG8L7mHFHJOj5jeKWBtXCi/syaxD86dFUs95/35cMG+wtf4qxiddykMgYunXgHK8LV9Je5SLvwzaEVNBT0FpJWEHq0TGHHZWVXqGrn9SikfF+NuZXugEMynE86XoZMRgInbd2svFc+zOZLo7kssMU14= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611822553; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PGD2Hxxva1v/CL+/7AMsseVrS1hfbb671q8VvUewR3Q=; b=mmHV0+XUKKA931zoGzvYRVALHevzGUYDK7er0Ade+W8b3rb5E37cYFJ9hqwlgK+pHGDu3EHBiWak/xeAbLupBRRD89UmFSeq37i/DEu/rOblsny6F6DE60bi7fWltUCdIxS8foNQWw66O8nXTxFBrIv9AZbgZxYHFDuAjev7vjk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611822553253358.24984107936564; Thu, 28 Jan 2021 00:29:13 -0800 (PST) Received: from localhost ([::1]:43386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52fw-0003Bx-56 for importer@patchew.org; Thu, 28 Jan 2021 03:29:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52ax-0006C9-P1 for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:03 -0500 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:52027) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52aw-0005l9-4H for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:03 -0500 Received: by mail-pj1-x1035.google.com with SMTP id a20so3433313pjs.1 for ; Thu, 28 Jan 2021 00:24:01 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.23.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:24:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PGD2Hxxva1v/CL+/7AMsseVrS1hfbb671q8VvUewR3Q=; b=kbJIjotXkUV5lodYVh3kUQBnndyGwOHWb45JU50NIWHBcFtHDsogcgetoYbZhR0maZ RUG/qTLIV3Q4A2GTOzLipRDGSMKrWqK1uA0Kkm+5v/86J18mGTv+C0VHRzC//4EfjzV4 Z3VUanK7HcxGILWwuaanp+JOw5FBJEnnVvzFot+geR0j9oaeRYe51s2gcatFv9wSCnT1 A2KF8BCkeEDFAMCjbcANPcDIB2BIxqDWi3qzAZKqlRk8beH1sPPS0bHgWLtmKCHI0VVp kDhJaAjTSMTKVtOR6/g9dKIK6MvKdXS2Fg5go7EZnlqfwlIu0GTJvvlJnDN1M3sgZ6PE ktnw== 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:mime-version:content-transfer-encoding; bh=PGD2Hxxva1v/CL+/7AMsseVrS1hfbb671q8VvUewR3Q=; b=FRffk5BeoXcFPNMCYdvSZMlUBiqaOkleY3mzJr57Jp/777TlverAX54MGxe45OzAOP x4pTqHnmaSLmyym1WpwhFIJwh6LZLrYO8CRi/gQVrbLc77CKwgyrlo1/rdwAqzVH+cfQ i28/4EjuUA4BbukGzsd6bFwySEBVLgYZXSqmTL4vcmvclygM/wt3EiGYNrqif2+dmZX1 xh1nEa2t31coxi3i4xOlrRlETf+coGS65vuwm53BIXdqyKgUu/viTllfoGJD09uFYncx JCjC/TtKrmb7ra1tTbPgABp579VQttUFWOb6OkGE3X/RXjDJcRN9x2umhEXMc8cYgatr tPNg== X-Gm-Message-State: AOAM533UH9HF8q4ANaoVt4JsJarz+FVYTR4UVikiZjCRwk8SyVtuWXnL 0rZxy5XSwQta9/uwdua0+PuqE9HG1dbSowfs X-Google-Smtp-Source: ABdhPJzOz1vJWK63PD3Bl/LM5GYbgrFAWh7lzOXyOhFMC+k+9NhVtWVnZi85stmOn8kJPtP2WdYXJA== X-Received: by 2002:a17:90a:7e2:: with SMTP id m89mr10098631pjm.2.1611822240837; Thu, 28 Jan 2021 00:24:00 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 16/23] tcg/tci: Merge INDEX_op_st8_{i32,i64} Date: Wed, 27 Jan 2021 22:23:24 -1000 Message-Id: <20210128082331.196801-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 233fc0604e..0978a5c554 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -606,6 +606,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, tci_write_reg(regs, t0, *(uint32_t *)(t1 + t2)); break; case INDEX_op_st8_i32: + case INDEX_op_st8_i64: t0 =3D tci_read_r8(regs, &tb_ptr); t1 =3D tci_read_r(regs, &tb_ptr); t2 =3D tci_read_s32(&tb_ptr); @@ -867,12 +868,6 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSta= te *env, t2 =3D tci_read_s32(&tb_ptr); tci_write_reg(regs, t0, *(uint64_t *)(t1 + t2)); break; - case INDEX_op_st8_i64: - t0 =3D tci_read_r8(regs, &tb_ptr); - t1 =3D tci_read_r(regs, &tb_ptr); - t2 =3D tci_read_s32(&tb_ptr); - *(uint8_t *)(t1 + t2) =3D t0; - break; case INDEX_op_st16_i64: t0 =3D tci_read_r16(regs, &tb_ptr); t1 =3D tci_read_r(regs, &tb_ptr); --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611823724; cv=none; d=zohomail.com; s=zohoarc; b=LF73xwsV+2ixq8b4MKNbnZEL9NZtho+q+5mB1VI3IV02GCokCUF7jmdbUszNs/hFYF5dl1L/vPTeDS4LjFtanXtjt4PJiRK2j1aXbz7DrOJn8ujDkVmiUZtIlbzJu+EooFvV0JAk7Uue/v/5kcYalq8HqBpzkolM/AkkIzGeJL8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611823724; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=huDZUDnwZEbcEx1xTqJKL+fBHu7QT2Tcumuy/oBbgvo=; b=g6xDQpusQs94tyq4h8+5KVMArXbbMZCzQu3DCL1DNdD2kKdvIh8fERQSALF7pIor+HAWpOxTtdKs1vIQrQq+zCYsVNq4xGRtgIlxS3LKbkX+H0aOMZ1ZRBVgGMBnk91XRl8H0q40kHiytAP3nmYm3P5WLa5U2mBhHB5mf4DGN3I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611823724219982.8752226247617; Thu, 28 Jan 2021 00:48:44 -0800 (PST) Received: from localhost ([::1]:58796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52yp-00057P-77 for importer@patchew.org; Thu, 28 Jan 2021 03:48:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52az-0006F5-1h for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:05 -0500 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:41884) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52ax-0005lZ-G6 for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:04 -0500 Received: by mail-pf1-x42d.google.com with SMTP id q20so3522892pfu.8 for ; Thu, 28 Jan 2021 00:24:03 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.24.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:24:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=huDZUDnwZEbcEx1xTqJKL+fBHu7QT2Tcumuy/oBbgvo=; b=d1HYdIxNR6vTAT1gZs/Yft4/Ky0dleA8cmZoNIh4s+kKATxXntsZ2oE3iSqaLuUpIn HB0gtysTwsDEzPwuZ9ZjR9bPCliVv8Kq0LJMuZqHZ2OhfSj5+npRnlsOWuzZ2NrAiehT mN76Uv4uwmAXhqslScsJLP3u7qCQnXrBlPQlOkYuJpwyk/IrPRViyBltrmmUmQVJVw/9 xNEsok6+U+JyFyvSGaNCIMSyB3/D0Z2q9QGG5dhIgYRfMy0xstViIQJW/iUBIl56KCLK q0e4EzRQajmzZqSX/JeCQmp1PtXkAA7/bTe0HdaGRKk21iufC9O2J/cnZiaK2IoYl7Qi P7rw== 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:mime-version:content-transfer-encoding; bh=huDZUDnwZEbcEx1xTqJKL+fBHu7QT2Tcumuy/oBbgvo=; b=l28APZwEvJkUs+FdLosRCAmRI+hjoBUB+BnIrbO2VLTnjPqRwZvmSG7Djth+LXMfpT U3u7sD7n4xnZUTVZs0kMYRqq82rzKpuX011b9Is3jwi1ISukL6iaMz+W057fGKTq4GrU OJyk14OkJzEtTvamcU6ixDkRDJPSZLhnebm8W5DFYhksWXMBdUrKkLxKaHAf/5xMniGT ZP0dbjTpaN8sBoj62pvoPvIteY7T2B//k0yT83ClWEXJ1Lgsw0lWDHvrx0eQBf9tyFi7 2/CyeJUYe/pyPXTbp3v86xCpiK/a7523wcVoDFMSt9765TugYDEzFlfmSQzSu0YZP8yy L+vA== X-Gm-Message-State: AOAM5308zt2fdB7rQKci/xGOTR5krCDrEe4tIipdzKQ/WmryFE6YFbe+ AJrUzs1Z42v6IgbBPo1jf+ecP0HCuLPEOtcV X-Google-Smtp-Source: ABdhPJxzcgXRFTBq+9Kr/D/a2X4SEqSN2AO0HXdXOFVXJu+DOf6cfOIN7p6rAcPEiwxFHkNtwfmmpg== X-Received: by 2002:a62:144c:0:b029:1c0:d62d:e16e with SMTP id 73-20020a62144c0000b02901c0d62de16emr14506550pfu.25.1611822242226; Thu, 28 Jan 2021 00:24:02 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 17/23] tcg/tci: Merge INDEX_op_st16_{i32,i64} Date: Wed, 27 Jan 2021 22:23:25 -1000 Message-Id: <20210128082331.196801-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 0978a5c554..67875636a5 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -613,6 +613,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, *(uint8_t *)(t1 + t2) =3D t0; break; case INDEX_op_st16_i32: + case INDEX_op_st16_i64: t0 =3D tci_read_r16(regs, &tb_ptr); t1 =3D tci_read_r(regs, &tb_ptr); t2 =3D tci_read_s32(&tb_ptr); @@ -868,12 +869,6 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSta= te *env, t2 =3D tci_read_s32(&tb_ptr); tci_write_reg(regs, t0, *(uint64_t *)(t1 + t2)); break; - case INDEX_op_st16_i64: - t0 =3D tci_read_r16(regs, &tb_ptr); - t1 =3D tci_read_r(regs, &tb_ptr); - t2 =3D tci_read_s32(&tb_ptr); - *(uint16_t *)(t1 + t2) =3D t0; - break; case INDEX_op_st32_i64: t0 =3D tci_read_r32(regs, &tb_ptr); t1 =3D tci_read_r(regs, &tb_ptr); --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611823779; cv=none; d=zohomail.com; s=zohoarc; b=KYa7gUsDhPlRj0nLrTS//gjOug5pAC8/ePxeWgu1ql6i2GtHxSrggzAxG11tUE+60RMU+ebitpzn/ieCg8WNaQ34amWghPqrNQMcj/rxs4dqwtLvpfE15uKqgai7dBjw/FFFcnOZvQorP6L951xZz46wQCSV12T9dZXg6xMKoYY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611823779; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=I2gmOz73yZNbJmL9p/xulaMICRegraILH4xJB4rgp4E=; b=ZRm6SKL3ZU3souczlQ3J5TBZ0EQ7qhiJ7HKrZYfu/NQ9ZaZd+xZ4wIzdX8haRnASWy5bFVtVxgiechF1HH+x/M19PtJO7h4BxWUtY7CWkJkz4WfiMfydc8dkLzki9QsHcEcx2S1RqOFuIEKC87q3aQfoCeFsH1flExpzZ5vdmww= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611823779170844.8391479373132; Thu, 28 Jan 2021 00:49:39 -0800 (PST) Received: from localhost ([::1]:60878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52zh-00060A-Tg for importer@patchew.org; Thu, 28 Jan 2021 03:49:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52b0-0006IR-La for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:06 -0500 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]:43568) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52ay-0005mC-Vk for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:06 -0500 Received: by mail-pg1-x52f.google.com with SMTP id n10so3784745pgl.10 for ; Thu, 28 Jan 2021 00:24:04 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.24.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:24:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=I2gmOz73yZNbJmL9p/xulaMICRegraILH4xJB4rgp4E=; b=HrEGWN1epWk40jdiBR43QAH+DXSg0tlnAbT6URSwcpD/ev/vxD+CSZhPAVGFiDs4P8 PvTU3kQpk2ZArQ2tW0BQsAQRF6Qx/ErLcUbbZ/QpZxLNAauuk0QFnbaCyQtrZb4Ml3ll Elf/lf/J7gwGQz+EDRnG9uA30qSP+ZDOQV2XXtma0okgEgAFuS49uQEgDRs7CW0FKQiN A89ComlFVV9WlG8NYIW/NmMt+K7UydcJp4QfPuW6SKIqoMdVkt13rRw1anxjeK9K3j+F VMHBHoBM0CdhWwiI9YVpbBiawOcDLBraHBue4gh1TPMFAybRSDcL3AET05RqV7Dh7LVn IUKw== 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:mime-version:content-transfer-encoding; bh=I2gmOz73yZNbJmL9p/xulaMICRegraILH4xJB4rgp4E=; b=eU/cpu+CrohkzsYA4SsrJYyokKKg31s+1HUAMC2mShv2TAXHUOkQW5W3mKCmxkqqn7 rAEocr0WbHXvLbiwqfopCCK2SFMAnRSN7RLbYcSB5lKIrHsk1s5B5YdJNyX5NGiaiskV R2k59SbO1ecuO0+pSzozx/La4HIbj2nlrO2d8PjLUVzOvR6M2x2eFCCE9orR0y1aTq9F DnGFcfR7pOw8Dw01od5QPHR+mhSd12svI2ZuV/pTaN7GA8JI22iC/+iA2Wp7K3terSVw w4QX61sYloH1AeJZ5+nFmfIbarNRnncXrMoR+ziFamxBilsMWPhR8TDnw0RP8FNOF4LA XusA== X-Gm-Message-State: AOAM531iPcSiFUvjM7LaGcfYYZg5VIP1bfy/n53V3VKJKGZl/VWRYLjG 7rdllVB9oaMuuW+5zioXXyXfwaRjWAPQDVMO X-Google-Smtp-Source: ABdhPJwJ+HILTeMZW4Ie28MnWMgpbC3qR4l2e3wBLUWQNpLKv2fmbBbA6Ki7vZB2wsQyHO+w9NyHsg== X-Received: by 2002:a63:2903:: with SMTP id p3mr15000311pgp.11.1611822243747; Thu, 28 Jan 2021 00:24:03 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 18/23] tcg/tci: Move stack bounds check to compile-time Date: Wed, 27 Jan 2021 22:23:26 -1000 Message-Id: <20210128082331.196801-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" The existing check was incomplete: (1) Only applied to two of the 7 stores, and not to the loads at all. (2) Only checked the upper, but not the lower bound of the stack. Doing this at compile time means that we don't need to do it at runtime as well. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 2 -- tcg/tci/tcg-target.c.inc | 13 +++++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 67875636a5..c4c303f874 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -623,7 +623,6 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, t0 =3D tci_read_r32(regs, &tb_ptr); t1 =3D tci_read_r(regs, &tb_ptr); t2 =3D tci_read_s32(&tb_ptr); - tci_assert(t1 !=3D sp_value || (int32_t)t2 < 0); *(uint32_t *)(t1 + t2) =3D t0; break; =20 @@ -879,7 +878,6 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, t0 =3D tci_read_r64(regs, &tb_ptr); t1 =3D tci_read_r(regs, &tb_ptr); t2 =3D tci_read_s32(&tb_ptr); - tci_assert(t1 !=3D sp_value || (int32_t)t2 < 0); *(uint64_t *)(t1 + t2) =3D t0; break; =20 diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 15981265db..a60fa524a4 100644 --- a/tcg/tci/tcg-target.c.inc +++ b/tcg/tci/tcg-target.c.inc @@ -484,10 +484,20 @@ static void tci_out_label(TCGContext *s, TCGLabel *la= bel) } } =20 +static void stack_bounds_check(TCGReg base, target_long offset) +{ + if (base =3D=3D TCG_REG_CALL_STACK) { + tcg_debug_assert(offset < 0); + tcg_debug_assert(offset >=3D -(CPU_TEMP_BUF_NLONGS * sizeof(long))= ); + } +} + static void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg= 1, intptr_t arg2) { uint8_t *old_code_ptr =3D s->code_ptr; + + stack_bounds_check(arg1, arg2); if (type =3D=3D TCG_TYPE_I32) { tcg_out_op_t(s, INDEX_op_ld_i32); tcg_out_r(s, ret); @@ -623,6 +633,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, co= nst TCGArg *args, case INDEX_op_st16_i64: case INDEX_op_st32_i64: case INDEX_op_st_i64: + stack_bounds_check(args[1], args[2]); tcg_out_r(s, args[0]); tcg_out_r(s, args[1]); tcg_debug_assert(args[2] =3D=3D (int32_t)args[2]); @@ -825,6 +836,8 @@ static void tcg_out_st(TCGContext *s, TCGType type, TCG= Reg arg, TCGReg arg1, intptr_t arg2) { uint8_t *old_code_ptr =3D s->code_ptr; + + stack_bounds_check(arg1, arg2); if (type =3D=3D TCG_TYPE_I32) { tcg_out_op_t(s, INDEX_op_st_i32); tcg_out_r(s, arg); --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611822812; cv=none; d=zohomail.com; s=zohoarc; b=YQTey0r0/j0v6yacnNWv/PaU5grWoDTEUi+9ACfce10MWP9LQ8iBh1LcQiXVKuIQJQsXbJCzNmHi10WfiNLguhHoWizWm6EhciKpTI2+E3tBLar0k+qGk9tpDcEeboHfH43HyjVaQpr30Az4zM8Wy5uDrUyDHej/VFhlEPIDJSs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611822812; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=bbk4RsHUJRWlg1yK2n4vH59KVtgZMjLMkLkrn0UF89s=; b=h36PVDja0fCyWGRsl9lCFR3ZXAS9sP/I1S2KnsfW8rXN4ObamAoQQYm2xlHtaj7UqsfSd2InMhQnza0U3YSz/lLK1BdP9287BHXFAfW6oGKx7Y1beODBxpu8ECCzKPn8LuYUBTshEixqHcjH4/nFiubVwpY1mTcDao1NG0uMrAs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611822812429200.07177744413264; Thu, 28 Jan 2021 00:33:32 -0800 (PST) Received: from localhost ([::1]:51982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52k7-0006oP-1O for importer@patchew.org; Thu, 28 Jan 2021 03:33:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52b1-0006LQ-TY for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:11 -0500 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:39381) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52b0-0005md-Cs for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:07 -0500 Received: by mail-pj1-x102b.google.com with SMTP id u4so3839398pjn.4 for ; Thu, 28 Jan 2021 00:24:05 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:24:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bbk4RsHUJRWlg1yK2n4vH59KVtgZMjLMkLkrn0UF89s=; b=c+KLjKXrWnproh5l7JJkNdXwlxBnzjY5dqTKfj5I4A3Hk/gkrtgEGnGjrI75j1cm6V oToK33s53JmC4HnVCPl51DyUD6L94J3XAjvjJFWCBHDQQvyxDIKCuHPzSD6CL7pcCajO pLJWrKZb1R28PqPLiC5Q/krG/oNtDKHpW8UpOkagwoJp4ea3LJT2AKM09paltMGMOIF3 KYZKnRF5N1SCResaPjQUeBw3nnGSVN31DUGky8qs/dGf1o+a/Ny2jsjbkBg+/Ih/U0Ee /bAbaCcxF5QQuCJHcN/3p8eUcN2ikXzEuU92h6Z9F7obUIYgXhaG4bK0dcSEkQ/6yJVs ObIA== 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:mime-version:content-transfer-encoding; bh=bbk4RsHUJRWlg1yK2n4vH59KVtgZMjLMkLkrn0UF89s=; b=b41MxtZr1QNGkyPPmqDpDG3/PpE2ENRSqWCIwlrYBlTdJgL5wGdMowg1D14ljhfx3w 9TyWLqmyZVKWk8K9bgsC/+dmULCMSdWJUoEZuG5trybQvXlVbjbTGjcKolk/hiQq/cRg bfM754QDAZU4xYcN5QcNQufS+pfTCvqdIV5zjkkue4vxxTCKW/YIsLgHoRLjOA/Dgi1g 4G+1xOiqebxXKsavlCpKZNSmgBJCf5ZAH4YVVD1LvKXiZFPfPwDW4xXfiuq3p6REDluB fxYpMl/blK25onoV29FEWcz1QNx9xFmamDyiLO0nloi3IN3RnbgzMOVeXD0DouJn/W4m TV3w== X-Gm-Message-State: AOAM532uu4tRWZcFRmv/1C345hgtq1kOsVnrC2YC4eYnT6z5owPK43d4 lAUuF0Imx1d0oN5UURCpymdO6PRIQYy3HKLB X-Google-Smtp-Source: ABdhPJwxSc6EhvgORShOe4KRgSLtwoJGlvAwezMyUPJGSfgw5tzUOmFRZI/M4XbCNzU2f8W3+7D82g== X-Received: by 2002:a17:902:ce89:b029:df:c98f:430d with SMTP id f9-20020a170902ce89b02900dfc98f430dmr15696043plg.18.1611822245159; Thu, 28 Jan 2021 00:24:05 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 19/23] tcg/tci: Merge INDEX_op_{st_i32,st32_i64} Date: Wed, 27 Jan 2021 22:23:27 -1000 Message-Id: <20210128082331.196801-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index c4c303f874..66b90f8489 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -620,6 +620,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, *(uint16_t *)(t1 + t2) =3D t0; break; case INDEX_op_st_i32: + case INDEX_op_st32_i64: t0 =3D tci_read_r32(regs, &tb_ptr); t1 =3D tci_read_r(regs, &tb_ptr); t2 =3D tci_read_s32(&tb_ptr); @@ -868,12 +869,6 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSta= te *env, t2 =3D tci_read_s32(&tb_ptr); tci_write_reg(regs, t0, *(uint64_t *)(t1 + t2)); break; - case INDEX_op_st32_i64: - t0 =3D tci_read_r32(regs, &tb_ptr); - t1 =3D tci_read_r(regs, &tb_ptr); - t2 =3D tci_read_s32(&tb_ptr); - *(uint32_t *)(t1 + t2) =3D t0; - break; case INDEX_op_st_i64: t0 =3D tci_read_r64(regs, &tb_ptr); t1 =3D tci_read_r(regs, &tb_ptr); --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611823880; cv=none; d=zohomail.com; s=zohoarc; b=Qyw741x5jy6Im8VnJ1Uz4om8R1UFxPO8rIBQHLMsvfQzW1Xi3zCys9R2fZrK1dSqiUPWb1ewlcvfJe9M98rT12aoaMULqruDo0xCMe6ieRi17+hwghvIlXY8GWaCSlgzPVltHIRXEHO+k3u/Eeqr6G/0hch9WaO6m0SHhevsrag= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611823880; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=J7kDIVNOxEBDaoT7WAnXMrsfZZNCOoe99UtUD6AohMg=; b=JNfG7pKPZ7E4qL9d2b4//10aujWHTCX89kAPgupIPpxQ5WCQBvlpPsCeGH0uPQSZb+7G2Q9AuC1jVViJErBrHikUHLzpjmMg/wBLYAnoV+QJCYYJ2+Re2H+v1Az0BuHUqCIPcvQLPmtjxzFMc9VOcqQ3AohQwWvhUoUBP6+tJ0U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611823880044658.895162251899; Thu, 28 Jan 2021 00:51:20 -0800 (PST) Received: from localhost ([::1]:35016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l531K-00073j-Tu for importer@patchew.org; Thu, 28 Jan 2021 03:51:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52b4-0006Ld-FT for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:11 -0500 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:36106) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52b2-0005nJ-8C for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:10 -0500 Received: by mail-pg1-x534.google.com with SMTP id c132so3808170pga.3 for ; Thu, 28 Jan 2021 00:24:07 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.24.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:24:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J7kDIVNOxEBDaoT7WAnXMrsfZZNCOoe99UtUD6AohMg=; b=n3Uy2F0iX0ysJwox3KO+3boL7ptiP7v+yP9RhUnPyUW5GCECmze/AIsRo6sqFsBA4S pM7rlMFBPftfkWtlV1Wbei4QHIzr/ZopQO0stHHXEA5bmlIRNLma9UjrAtAinJ2nnmvl LVyQ+xnZad46mKvla5XQqTIu3J9emIYKVoBtaWilPDFsyUWHBCvHP7D92PH+/xeg7Rtg jdESjQOjczskv0rswioZAeO6Dy5fzwpf0Qs1N4WJ978uCSPQ/zxSuAJz/vFxjQ8YS1Gw 4pJmjuInzOMlQdQSuwBH0W75KX0HucGwSrU/WGEbIzuZ2PTOGj5zTd/hkQ9cz0NV7hCt rpXQ== 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:mime-version:content-transfer-encoding; bh=J7kDIVNOxEBDaoT7WAnXMrsfZZNCOoe99UtUD6AohMg=; b=OBT7BMT5kgiZmx3rpAKEq342ndZ+nlnjNIjSMbVXKBYWa2hHwkTuaq7siroX+bndKd 7zs2bbf5vjpgUCksbTUQiwM8lN84poDw+O+FsAdgYDYu2oanXXOpHYCJcJCwvT5hya7s eiHuGjp2qUOyTT/r6ZIxBtDok2oE2SdIliOp5GZUTzFzg/6C6akXOPQ6+ZzxNN8PWJjY D+RPr8IVOw+pIyMkOxZnJwwAoXDsxs6/raagqJicEQcT57nTya1GJMt/FhZnU8UNeXPp GLu8oF7DN2rJ+MqZ+Kyj8Awhf4Tpf+/FVTj6XzsIf7nYQgon0VDk994QcKVF3yBBs09L xTLw== X-Gm-Message-State: AOAM530sizHit2bu2wYKoA0s+hjq0nQeN9M0yW6DHrCsPfxC2J+cBYGD sKyNFCmrxUlI3tfx87SgB7khivEXe6g9YiCw X-Google-Smtp-Source: ABdhPJzflitRPzsoZMJnQ2GFEZXiBmMFjMGDE+E54gQ9Baa/uerjx0jgtSp6DL1frKWb29sCgcZ8ew== X-Received: by 2002:a62:1a43:0:b029:1b9:6acc:f485 with SMTP id a64-20020a621a430000b02901b96accf485mr15125737pfa.42.1611822247040; Thu, 28 Jan 2021 00:24:07 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 20/23] tcg/tci: Use g_assert_not_reached Date: Wed, 27 Jan 2021 22:23:28 -1000 Message-Id: <20210128082331.196801-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Three TODO instances are never happen cases. Other uses of tcg_abort are also indicating unreachable cases. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Stefan Weil Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 66b90f8489..2ce67a8fd3 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -360,7 +360,7 @@ static bool tci_compare32(uint32_t u0, uint32_t u1, TCG= Cond condition) result =3D (u0 > u1); break; default: - TODO(); + g_assert_not_reached(); } return result; } @@ -402,7 +402,7 @@ static bool tci_compare64(uint64_t u0, uint64_t u1, TCG= Cond condition) result =3D (u0 > u1); break; default: - TODO(); + g_assert_not_reached(); } return result; } @@ -1109,7 +1109,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSt= ate *env, tmp32 =3D qemu_ld_beul; break; default: - tcg_abort(); + g_assert_not_reached(); } tci_write_reg(regs, t0, tmp32); break; @@ -1158,7 +1158,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSt= ate *env, tmp64 =3D qemu_ld_beq; break; default: - tcg_abort(); + g_assert_not_reached(); } tci_write_reg(regs, t0, tmp64); if (TCG_TARGET_REG_BITS =3D=3D 32) { @@ -1186,7 +1186,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSt= ate *env, qemu_st_bel(t0); break; default: - tcg_abort(); + g_assert_not_reached(); } break; case INDEX_op_qemu_st_i64: @@ -1216,7 +1216,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSt= ate *env, qemu_st_beq(tmp64); break; default: - tcg_abort(); + g_assert_not_reached(); } break; case INDEX_op_mb: @@ -1224,8 +1224,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSt= ate *env, smp_mb(); break; default: - TODO(); - break; + g_assert_not_reached(); } tci_assert(tb_ptr =3D=3D old_code_ptr + op_size); } --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611823048; cv=none; d=zohomail.com; s=zohoarc; b=B19WAIXPpf/Cd0O4grDxHh+thUNNhLsaijdhiph3w2kGrlhag/oFAJKAf3Z74EjQ8kMF6a56RvoBXnmzqtZagVK//merjxTz9QhfXPTKjAenlxaDvIgKwdztnoKdLOgoJxu9kRsTfqOjjnRXVP+imwEPQqr7Y/w5l9YnESRBJiE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611823048; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=m2ze6FL+5Rg8ehBHjUThMYSDxbo0AgwLwhZ3Mex+2Fk=; b=VDvYoUsYNAoHZ7N+v7XMj2Un887aQfd/dqmzI5V/XwqGm3Y7QzAmTzHwRlTeB2zzPOJ5h4LwgByperSF1yD8yXmvSzDfRXvGeQik+y10k8PbB3nQmKOu8VSSxaUkYdil0DFGi5YEjj7xwZnHuUHnPNJwe1yzTBa6KGS6wwdtZqA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611823048738542.9596793095055; Thu, 28 Jan 2021 00:37:28 -0800 (PST) Received: from localhost ([::1]:35096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52nu-000363-Oi for importer@patchew.org; Thu, 28 Jan 2021 03:37:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52b7-0006MX-Ii for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:13 -0500 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:41893) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52b4-0005nk-28 for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:13 -0500 Received: by mail-pf1-x436.google.com with SMTP id q20so3523033pfu.8 for ; Thu, 28 Jan 2021 00:24:09 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.24.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:24:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=m2ze6FL+5Rg8ehBHjUThMYSDxbo0AgwLwhZ3Mex+2Fk=; b=hRJWj2TuVDLgyxPGDzfoWgPf/W/mp8+JQiAjBS9J2XqZz7EUZua2GNUrjlixVz58p2 8orQuMRaBkTX7gUm4SMSLUyrxsMYpFlTMGAdlWF7IJL/63Y8z3DCuuGwF9j5t8htlnIY 08lDpsFVxvFvFpgdmU7JHJzLm0oolTyCQCsTDnR2O9PgBKoDjbiMkQWCrvGG16GaPuME vPsH1PvHtemV/64t885KLH9Gok8WxUi/J0xmf8AubC1C7TWonyFDpXOUb4jdNI45cpmD jHtX7GEeEsX5lqXYBN5O9X+8f91JNgXmhuaGDUDf4+dc4N8xvhkLtGcnI0kzeRC1HfOS QTXA== 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:mime-version:content-transfer-encoding; bh=m2ze6FL+5Rg8ehBHjUThMYSDxbo0AgwLwhZ3Mex+2Fk=; b=uXpGCHi55ZR7LShrdw1cQaiDw8H9xt9gdtbSTcUt7WFK+4fkb+NtkSEzktDhLEa+/f Ed9rYhDLgappdxC6PEVTWH7gLQVNEF4Yut8qcFRboRRFndg3kQNu85EpGX0moyKhHwBb I4+sy8IMWa6L5a/ZHZSIGmU7UMPq2R1jfw9ZpoASSjFXVUVsm6kBGovVlQUH/QcQ93Bi ZpEz1crYfZvjsxKp/mRekt+wMwEnF2g2DkWwXWdB2OHA4jbyjhWQOQNUnLkfQ+DEx0NQ wFgnHIX6vUtlWqGiOgHPvVBxJG1L1Spnbnsjb26xI5HyCjcL1TSBJr+sI4BvpfwR/I3q yIHA== X-Gm-Message-State: AOAM5312CTbpYW/HiLdj0nUYM9FPh2l4jtfhK9vYUBERJN174plHr5CM 3fgdCpahPjKXJ4vexh1nOCzaWXiruqNRojJB X-Google-Smtp-Source: ABdhPJyBdcKWIqvTbXWZmIJ/SnXlLYRf3O99f5sJNfnFMKYt1oysmzuIgHahIM16PO9hWgeSo5nYwg== X-Received: by 2002:a62:5a86:0:b029:1ae:6b45:b6a9 with SMTP id o128-20020a625a860000b02901ae6b45b6a9mr14555952pfb.7.1611822248455; Thu, 28 Jan 2021 00:24:08 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 21/23] tcg/tci: Remove dead code for TCG_TARGET_HAS_div2_* Date: Wed, 27 Jan 2021 22:23:29 -1000 Message-Id: <20210128082331.196801-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" We do not simultaneously support div and div2 -- it's one or the other. TCI is already using div, so remove div2. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 12 ------------ tcg/tci/tcg-target.c.inc | 16 ---------------- 2 files changed, 28 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 2ce67a8fd3..32931ea611 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -647,7 +647,6 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchStat= e *env, t2 =3D tci_read_ri32(regs, &tb_ptr); tci_write_reg(regs, t0, t1 * t2); break; -#if TCG_TARGET_HAS_div_i32 case INDEX_op_div_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_ri32(regs, &tb_ptr); @@ -672,12 +671,6 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSta= te *env, t2 =3D tci_read_ri32(regs, &tb_ptr); tci_write_reg(regs, t0, t1 % t2); break; -#elif TCG_TARGET_HAS_div2_i32 - case INDEX_op_div2_i32: - case INDEX_op_divu2_i32: - TODO(); - break; -#endif case INDEX_op_and_i32: t0 =3D *tb_ptr++; t1 =3D tci_read_ri32(regs, &tb_ptr); @@ -903,11 +896,6 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSta= te *env, case INDEX_op_remu_i64: TODO(); break; -#elif TCG_TARGET_HAS_div2_i64 - case INDEX_op_div2_i64: - case INDEX_op_divu2_i64: - TODO(); - break; #endif case INDEX_op_and_i64: t0 =3D *tb_ptr++; diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index a60fa524a4..842807ff2e 100644 --- a/tcg/tci/tcg-target.c.inc +++ b/tcg/tci/tcg-target.c.inc @@ -71,15 +71,10 @@ static const TCGTargetOpDef tcg_target_op_defs[] =3D { { INDEX_op_add_i32, { R, RI, RI } }, { INDEX_op_sub_i32, { R, RI, RI } }, { INDEX_op_mul_i32, { R, RI, RI } }, -#if TCG_TARGET_HAS_div_i32 { INDEX_op_div_i32, { R, R, R } }, { INDEX_op_divu_i32, { R, R, R } }, { INDEX_op_rem_i32, { R, R, R } }, { INDEX_op_remu_i32, { R, R, R } }, -#elif TCG_TARGET_HAS_div2_i32 - { INDEX_op_div2_i32, { R, R, "0", "1", R } }, - { INDEX_op_divu2_i32, { R, R, "0", "1", R } }, -#endif /* TODO: Does R, RI, RI result in faster code than R, R, RI? If both operands are constants, we can optimize. */ { INDEX_op_and_i32, { R, RI, RI } }, @@ -156,9 +151,6 @@ static const TCGTargetOpDef tcg_target_op_defs[] =3D { { INDEX_op_divu_i64, { R, R, R } }, { INDEX_op_rem_i64, { R, R, R } }, { INDEX_op_remu_i64, { R, R, R } }, -#elif TCG_TARGET_HAS_div2_i64 - { INDEX_op_div2_i64, { R, R, "0", "1", R } }, - { INDEX_op_divu2_i64, { R, R, "0", "1", R } }, #endif { INDEX_op_and_i64, { R, RI, RI } }, #if TCG_TARGET_HAS_andc_i64 @@ -705,10 +697,6 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, c= onst TCGArg *args, case INDEX_op_remu_i64: /* Optional (TCG_TARGET_HAS_div_i64). */ TODO(); break; - case INDEX_op_div2_i64: /* Optional (TCG_TARGET_HAS_div2_i64). */ - case INDEX_op_divu2_i64: /* Optional (TCG_TARGET_HAS_div2_i64). */ - TODO(); - break; case INDEX_op_brcond_i64: tcg_out_r(s, args[0]); tcg_out_ri64(s, const_args[1], args[1]); @@ -748,10 +736,6 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, c= onst TCGArg *args, tcg_out_ri32(s, const_args[1], args[1]); tcg_out_ri32(s, const_args[2], args[2]); break; - case INDEX_op_div2_i32: /* Optional (TCG_TARGET_HAS_div2_i32). */ - case INDEX_op_divu2_i32: /* Optional (TCG_TARGET_HAS_div2_i32). */ - TODO(); - break; #if TCG_TARGET_REG_BITS =3D=3D 32 case INDEX_op_add2_i32: case INDEX_op_sub2_i32: --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611823137; cv=none; d=zohomail.com; s=zohoarc; b=J/hz5nD6mjBKEIzbAeX1WWHBOBuJARDYgdtKQzSUcXK1GSWREl2OosdGPSIV1d4h606/D92cHG9vV+v71gWG3AYuYl+QEWA4h5pCWIUbbPkM//OO//MVW155qHcfvFKCnUmbLFSgTEzwrTrIW1OwDwR/eOHaco4+hrCimVOnMpM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611823137; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xJrZEGVQR1/tg7o98CXOJgjBnTA9yUqVpyK8VFJm0nw=; b=E3NTvgD52KtcrFNnbNq3qvULi/C9bgTPDaZz1TLFmqnf30chy0Xi65kjPRo+kQ92mz6aoNY54tMj+thD0nKZriYUfvRoPeimZsyUiwhaDMMf/F17OFvR8qWO3B8TLxR+nN+2llbJoun+ExuBVKIbNWxg58E/IADjHT+Siwbzgng= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611823137578964.2971149259841; Thu, 28 Jan 2021 00:38:57 -0800 (PST) Received: from localhost ([::1]:38460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52pK-0004Y2-4W for importer@patchew.org; Thu, 28 Jan 2021 03:38:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52b8-0006NA-M5 for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:14 -0500 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]:41085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52b5-0005np-Ic for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:14 -0500 Received: by mail-pg1-x52c.google.com with SMTP id i7so3791579pgc.8 for ; Thu, 28 Jan 2021 00:24:10 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.24.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:24:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xJrZEGVQR1/tg7o98CXOJgjBnTA9yUqVpyK8VFJm0nw=; b=St/YIEY64oz16NQj+W+1F1ozUtMerKJxAo7Wv0b41VnWCxXja7/FnDall2Nu2nSauy jfEWTPPLvxnzELaJwSizrgSnB6jr1ZnL3l9Z2yoHbVml+g9PYuFx/i0uS8xgjZzYbEPe 5zsH6+4NbYG8K6YiZsybzXuIGnvvkiOFbu9NlsQnQBbQafemWWxvMsRevEseNR8AL6zD w3Q+vzxYFXxx3/VjQ1o+fbSTdlFn1fpjWfmYUBckq03nPdGkXy22wF/IY0uUOy0n1LKL S1fZDJ1Inik/IrwV56kKGQ3R3B3gQu9YmWzHcvUUPnm17wb88oHofjkgXq3pTZdxX5tu NB/Q== 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:mime-version:content-transfer-encoding; bh=xJrZEGVQR1/tg7o98CXOJgjBnTA9yUqVpyK8VFJm0nw=; b=LKWtFI1PszM5vs1e6PDpGgDLYkJSYhptkY0sGTWNeZ8JFbN0Y0Q7PtSSMzER/lXoXZ f5mRZJvfC1nDi4KrTZKOMCuqcdqmlit7jwy7YMxxeWEll2JqOZJQWaPN08oRkrCzLd8e JiUTKQXXoxL6gy94fH2HIPjL/PKz8BnyFB/Gx69igLB709L8dOaK0ITCaYVQ/pxstrhJ VehH2MPzbLZFJdhfyqvImBfhrfALWsC83/mdzC77ZsBpEZwVIL8zJilY2DrM9+vxaRqo Q64pwBEA7b3cZ/1dyYJCtZ2tzZMMncwnkAWXaS3Z1VBC35FGSBZgQxbDLMB742CnPSk+ rKrg== X-Gm-Message-State: AOAM531UM+2go4ztrMns6kj12o1tO0UkGJ5m2lNJytduOsChlXym9rP1 Bfk0K+EYGHtIqtxMluZl9grF1fmIsinJ6TqP X-Google-Smtp-Source: ABdhPJzWWvfvCLrI902nqtTdFPrHyEcnaRKN39JFEp8luQo2vzC3an9oqQp1mG2ZujfOJSKLw/jjYA== X-Received: by 2002:aa7:8497:0:b029:1bf:47c6:523a with SMTP id u23-20020aa784970000b02901bf47c6523amr15004245pfn.0.1611822249897; Thu, 28 Jan 2021 00:24:09 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 22/23] tcg/tci: Implement 64-bit division Date: Wed, 27 Jan 2021 22:23:30 -1000 Message-Id: <20210128082331.196801-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52c; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Trivially implemented like other arithmetic. Tested via check-tcg and the ppc64 target. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Stefan Weil Tested-by: Alex Benn=C3=A9e --- tcg/tci/tcg-target.h | 4 ++-- tcg/tci.c | 28 ++++++++++++++++++++++------ tcg/tci/tcg-target.c.inc | 12 ++++-------- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/tcg/tci/tcg-target.h b/tcg/tci/tcg-target.h index bb784e018e..7fc349a3de 100644 --- a/tcg/tci/tcg-target.h +++ b/tcg/tci/tcg-target.h @@ -100,8 +100,8 @@ #define TCG_TARGET_HAS_extract_i64 0 #define TCG_TARGET_HAS_sextract_i64 0 #define TCG_TARGET_HAS_extract2_i64 0 -#define TCG_TARGET_HAS_div_i64 0 -#define TCG_TARGET_HAS_rem_i64 0 +#define TCG_TARGET_HAS_div_i64 1 +#define TCG_TARGET_HAS_rem_i64 1 #define TCG_TARGET_HAS_ext8s_i64 1 #define TCG_TARGET_HAS_ext16s_i64 1 #define TCG_TARGET_HAS_ext32s_i64 1 diff --git a/tcg/tci.c b/tcg/tci.c index 32931ea611..0065c854a4 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -889,14 +889,30 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchSt= ate *env, t2 =3D tci_read_ri64(regs, &tb_ptr); tci_write_reg(regs, t0, t1 * t2); break; -#if TCG_TARGET_HAS_div_i64 case INDEX_op_div_i64: - case INDEX_op_divu_i64: - case INDEX_op_rem_i64: - case INDEX_op_remu_i64: - TODO(); + t0 =3D *tb_ptr++; + t1 =3D tci_read_ri64(regs, &tb_ptr); + t2 =3D tci_read_ri64(regs, &tb_ptr); + tci_write_reg(regs, t0, (int64_t)t1 / (int64_t)t2); + break; + case INDEX_op_divu_i64: + t0 =3D *tb_ptr++; + t1 =3D tci_read_ri64(regs, &tb_ptr); + t2 =3D tci_read_ri64(regs, &tb_ptr); + tci_write_reg(regs, t0, (uint64_t)t1 / (uint64_t)t2); + break; + case INDEX_op_rem_i64: + t0 =3D *tb_ptr++; + t1 =3D tci_read_ri64(regs, &tb_ptr); + t2 =3D tci_read_ri64(regs, &tb_ptr); + tci_write_reg(regs, t0, (int64_t)t1 % (int64_t)t2); + break; + case INDEX_op_remu_i64: + t0 =3D *tb_ptr++; + t1 =3D tci_read_ri64(regs, &tb_ptr); + t2 =3D tci_read_ri64(regs, &tb_ptr); + tci_write_reg(regs, t0, (uint64_t)t1 % (uint64_t)t2); break; -#endif case INDEX_op_and_i64: t0 =3D *tb_ptr++; t1 =3D tci_read_ri64(regs, &tb_ptr); diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 842807ff2e..8c0e77a0be 100644 --- a/tcg/tci/tcg-target.c.inc +++ b/tcg/tci/tcg-target.c.inc @@ -146,12 +146,10 @@ static const TCGTargetOpDef tcg_target_op_defs[] =3D { { INDEX_op_add_i64, { R, RI, RI } }, { INDEX_op_sub_i64, { R, RI, RI } }, { INDEX_op_mul_i64, { R, RI, RI } }, -#if TCG_TARGET_HAS_div_i64 { INDEX_op_div_i64, { R, R, R } }, { INDEX_op_divu_i64, { R, R, R } }, { INDEX_op_rem_i64, { R, R, R } }, { INDEX_op_remu_i64, { R, R, R } }, -#endif { INDEX_op_and_i64, { R, RI, RI } }, #if TCG_TARGET_HAS_andc_i64 { INDEX_op_andc_i64, { R, RI, RI } }, @@ -678,6 +676,10 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, c= onst TCGArg *args, case INDEX_op_sar_i64: case INDEX_op_rotl_i64: /* Optional (TCG_TARGET_HAS_rot_i64). */ case INDEX_op_rotr_i64: /* Optional (TCG_TARGET_HAS_rot_i64). */ + case INDEX_op_div_i64: /* Optional (TCG_TARGET_HAS_div_i64). */ + case INDEX_op_divu_i64: /* Optional (TCG_TARGET_HAS_div_i64). */ + case INDEX_op_rem_i64: /* Optional (TCG_TARGET_HAS_div_i64). */ + case INDEX_op_remu_i64: /* Optional (TCG_TARGET_HAS_div_i64). */ tcg_out_r(s, args[0]); tcg_out_ri64(s, const_args[1], args[1]); tcg_out_ri64(s, const_args[2], args[2]); @@ -691,12 +693,6 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, c= onst TCGArg *args, tcg_debug_assert(args[4] <=3D UINT8_MAX); tcg_out8(s, args[4]); break; - case INDEX_op_div_i64: /* Optional (TCG_TARGET_HAS_div_i64). */ - case INDEX_op_divu_i64: /* Optional (TCG_TARGET_HAS_div_i64). */ - case INDEX_op_rem_i64: /* Optional (TCG_TARGET_HAS_div_i64). */ - case INDEX_op_remu_i64: /* Optional (TCG_TARGET_HAS_div_i64). */ - TODO(); - break; case INDEX_op_brcond_i64: tcg_out_r(s, args[0]); tcg_out_ri64(s, const_args[1], args[1]); --=20 2.25.1 From nobody Tue May 21 15:57:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611823242; cv=none; d=zohomail.com; s=zohoarc; b=ayGHNaCmK8S2/UMs7PeGYixTT8c5h3FkkLHyWvntp8gJ5q7rvXVC8LhbJ4LM4vBIOTXzkzWuAgqZ+EeGU64vuBWMgkHdI4IzIo55AtEctkmE6zsJbDfttOn/Gx+Aa+xe6h8WJOX4o7j/n8YK19XK2oW+bPBAM+cFOA3e/Wqu8Us= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611823242; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ow13H3XpC3DSu++G/PbUgIwFegJxZwC/PStYl8iWnNw=; b=FO3yXMI4rcJPNHvvniIGGVAPTrY6omEjjq5n1p42moyD2pAOfeuzvGiDDiNtyxo9yhym7dQ1yVuWkuuLRSD8uHdc+UenpU4GD5kcR3N/Fh3nC/Qk6iBbQrY53RTbuIrhd58iMUqwMDhDLd55uPkkhlSLtkCXwWqcwB+/ewzAMyE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611823242721222.39905151234348; Thu, 28 Jan 2021 00:40:42 -0800 (PST) Received: from localhost ([::1]:41448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l52r3-0005nJ-NQ for importer@patchew.org; Thu, 28 Jan 2021 03:40:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l52b8-0006NV-W8 for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:15 -0500 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:38777) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l52b7-0005o3-04 for qemu-devel@nongnu.org; Thu, 28 Jan 2021 03:24:14 -0500 Received: by mail-pf1-x432.google.com with SMTP id y205so3519951pfc.5 for ; Thu, 28 Jan 2021 00:24:12 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id s24sm4658292pfd.118.2021.01.28.00.24.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 00:24:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ow13H3XpC3DSu++G/PbUgIwFegJxZwC/PStYl8iWnNw=; b=LpTgH3qQe0nyFDzF3yAZucABJ4pgeopaOjA74kvo3VNjPFqjnS+rCnvOTyAAHYJcnE fWvK+TjK4avvHKjdlmQQNJmgUWPYpim1+D1wyO8ECPs/lgP3xuJWHcEQbRLKjPet8rvQ 5+0hJcM9FeW4Z6NGicjAXnjqZR7O4GR9NGrjvIrrO6g4b78khQjzKgyeX5mYVVw+dxqy DVP0tbYEO0/kcYz1ngWZj0Li2xynY6sfn8vK9A2o8Ix5P5jBnqaaNk4d3o78fA8EJYz0 7jCnx4PgTWmSTMn7Jb0LMvAGFiOAFQLzDjSc8Lm9rzCTppUwPHpCA7tYKdexBabs1Wk+ gzeQ== 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:mime-version:content-transfer-encoding; bh=ow13H3XpC3DSu++G/PbUgIwFegJxZwC/PStYl8iWnNw=; b=ahAHGbR9AgyqVqUKUKrq91biapj4PNWaOyuVLQDSK7T2tyoFxyLN7uFr43RgLf1bd+ E1gJYQyhCvTOXYm3RUippI3uIQTdcU/8CMhH3eSwzdzrDbTw7/tQ/E5nrbIc2wPMx7Pc sN4G824OU8v7Nu4dyej0BQumNO/jtbjCFpKIwI3JU+hoSsswqHdRypMUQrW+XfPj3fwd ugikqqkKyk0u1+KWXKxTkr2yB6T6ZvO1Lsw8bjIhkaRroakWQez+rBTwceJEYuox+0UR Cz4xtXTAHcRZblPT1le2fDv1VenKMEtAgcboTMZqjxYnM8/2/vfb1MHJer8QwlpJnt3F oVGQ== X-Gm-Message-State: AOAM531BmOJKLpE2krRIs+ww13o+7Wh54xCBqe5gfTeQL8aMo9jZ0w9J wiNBDaUUOmWH1WIfJUu7uKELb0qjCKZPVQCl X-Google-Smtp-Source: ABdhPJz+NtLbarN9EU12eoItYjWtlJz7aeW6Fk8lyQO6UlW+hUtzz9jv0c36M37lFjBgVaVC4/GdJA== X-Received: by 2002:a62:ea17:0:b029:1ad:4788:7815 with SMTP id t23-20020a62ea170000b02901ad47887815mr14989108pfh.1.1611822251296; Thu, 28 Jan 2021 00:24:11 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 23/23] tcg/tci: Remove TODO as unused Date: Wed, 27 Jan 2021 22:23:31 -1000 Message-Id: <20210128082331.196801-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128082331.196801-1-richard.henderson@linaro.org> References: <20210128082331.196801-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- tcg/tci.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 0065c854a4..efc0ca20a6 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -33,14 +33,6 @@ #include "tcg/tcg-op.h" #include "qemu/compiler.h" =20 -/* Marker for missing code. */ -#define TODO() \ - do { \ - fprintf(stderr, "TODO %s:%u: %s()\n", \ - __FILE__, __LINE__, __func__); \ - tcg_abort(); \ - } while (0) - #if MAX_OPC_PARAM_IARGS !=3D 6 # error Fix needed, number of supported input arguments changed! #endif --=20 2.25.1