From nobody Wed Apr 16 07:44:32 2025 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=1654183092; cv=none; d=zohomail.com; s=zohoarc; b=afTKs1GU4VTrDK0CB+psHtgU7XtA6Cp/cUqoSvuOCnzau9GFxiBsPwnbj37YqEp/UZgutaX//6jbyFi1EG83r9OzEhhyaTHH2jN5Dh3mh3S8JcqYabAkbLrcvlwiu6meAZvdCTJBEjud4L+nVqbDvfdeC0kQfGKBsWQOrA4Xmt0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654183092; 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=4TlQd9U4tjMzAzpm7T3B0kc5/gc9CrLmX8sJ+ar9r7o=; b=mpGjYLCHShsFkDYw4AlZUhTHkRanOF9GpMvfT87eZHXslZ+eJBQ3HNY8Hxqa3t7sI8lHBFMDsEWPNU8P4yoyHLTIUQxhwjyWFpYh2IGkeG64H4cre+Zi8h9zo7MtzbWXVet/aVj00GOZRaDv6KPiWsn0m4Snxt5YRVR03NsVHog= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654183092187489.8528774289383; Thu, 2 Jun 2022 08:18:12 -0700 (PDT) Received: from localhost ([::1]:52502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwmaQ-0006ai-8l for importer@patchew.org; Thu, 02 Jun 2022 11:18:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwmVl-0008WT-3H for qemu-devel@nongnu.org; Thu, 02 Jun 2022 11:13:21 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:38608) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwmVj-0006By-EI for qemu-devel@nongnu.org; Thu, 02 Jun 2022 11:13:20 -0400 Received: by mail-pf1-x433.google.com with SMTP id e11so4998006pfj.5 for ; Thu, 02 Jun 2022 08:13:19 -0700 (PDT) Received: from stoup.. ([2607:fb90:80cd:3d17:bb90:8dda:8cb2:7569]) by smtp.gmail.com with ESMTPSA id x1-20020a170902820100b001618383483fsm3625159pln.224.2022.06.02.08.13.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jun 2022 08:13:17 -0700 (PDT) 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=4TlQd9U4tjMzAzpm7T3B0kc5/gc9CrLmX8sJ+ar9r7o=; b=A2goC8g599B6WZFE/VJKcwMd2TeNeLXTiPL1TLzgqeul+GdlB/5na1onyq8WVrpKt8 S8rdeWrCESjDI4fp4VkLsAEjYGh33eiXhhETIUKuuPsmcWYX+2wVxgdJiGoIn1UR8T3z HqLhPhVq2CCy+F3/0CjQj9mO6pxjGuT5+1l2Ks9DTIqqplgWC3gGpEUaFzthF1rS/gM5 yhprK3V74C9pwY0NLWuk3F4fQygNZZWzhVYprRHRLE14sB4kqQKqjiDbU/MMaD/bXlJq SaGMb8+yJBT1XnofFLf42sf0CeKjIw+D6cHrW6WlACnru3h9uyUGrGtJ1YMas8cCVLoW XeUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4TlQd9U4tjMzAzpm7T3B0kc5/gc9CrLmX8sJ+ar9r7o=; b=qBqC0S53vcVFUVkAf7qv3J68bNCim2Xg1MfJU99/LYLfvFZYohR73R6np3dT7B+T6k b84Zu1VjQ+rKtTiGp4k3/YjL1E3L2/X26GpSiNvQvnPmQjz9uChLRcHayo3/J7fuehNo wrj3WBvz1avj73ixPSzw02S8LUYoOsTSK5sdKG2eWuqh2qvg26CFaPVraPA7EgJ2UIST dtlNwFWH2rjAQol/6ftEOHQtUOQCRd05JdGKLP0SbFVRIHMmomAiYCXIQHtxivwMy4oJ PN9N9wZAqrclc7hvoLJYV5vnGFyl7w8plZoe5p8RD4uGyRCAjMVfaG2tPT+h8hV/In94 a8Sg== X-Gm-Message-State: AOAM5311JnLZPl9GJJo7FV6TkaebD3heaFNcx1jjFCMAo6mCofpita1e URqMt9KHOTmUI+sN7B17Wq7VG0J2w6T59A== X-Google-Smtp-Source: ABdhPJwmddSbuJoCyWLzqB0pEBdFkXlc3/wTmuquPoglzWJBRZ+EPrEdumfK7c0uygrA6egP3VW4Bg== X-Received: by 2002:a62:6411:0:b0:50a:81df:bfa6 with SMTP id y17-20020a626411000000b0050a81dfbfa6mr5742280pfb.26.1654182797984; Thu, 02 Jun 2022 08:13:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Matheus Ferst Subject: [PULL 1/3] tcg: Add tcg_gen_mov_ptr Date: Thu, 2 Jun 2022 08:13:10 -0700 Message-Id: <20220602151312.477967-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220602151312.477967-1-richard.henderson@linaro.org> References: <20220602151312.477967-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::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x433.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1654183092913100001 Content-Type: text/plain; charset="utf-8" Add an interface to perform moves between TCGv_ptr. Reviewed-by: Matheus Ferst Signed-off-by: Richard Henderson --- include/tcg/tcg-op.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h index b09b8b4a05..209e168305 100644 --- a/include/tcg/tcg-op.h +++ b/include/tcg/tcg-op.h @@ -1288,6 +1288,11 @@ static inline void tcg_gen_addi_ptr(TCGv_ptr r, TCGv= _ptr a, intptr_t b) glue(tcg_gen_addi_,PTR)((NAT)r, (NAT)a, b); } =20 +static inline void tcg_gen_mov_ptr(TCGv_ptr d, TCGv_ptr s) +{ + glue(tcg_gen_mov_,PTR)((NAT)d, (NAT)s); +} + static inline void tcg_gen_brcondi_ptr(TCGCond cond, TCGv_ptr a, intptr_t b, TCGLabel *label) { --=20 2.34.1 From nobody Wed Apr 16 07:44:32 2025 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=1654183324; cv=none; d=zohomail.com; s=zohoarc; b=C9UwTR9ScnZ3/9LIFiSuN3KUhvfc+YAMZWMjXwe73ZzlXHElOsuriF9GypdD9S6rdq479VsVrPCzLbwCl/D4rOZUQHbXhzjFVgMmq2zTL5FOk4bm5jMdRZY/+rswyWqPkiwvpnuEISSofySn4IEFEisx9S7p25uJvsZrevBkLGc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654183324; h=Content-Transfer-Encoding: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=9pazjDNhxS4z0NmOrBsgRIL8mzZfsAVnJBL6W/2yfw0=; b=YMYqh8qOE/GAdabdStQU3yNoUr/l+YuGuI+EWp+z+qSqermBt/ronOZqTgIfXlW7gNg5Sc4PdBnIc+ob7o6ax7lOOiUXQHwkpzfx/5kfWURpZyUAa3q7JcH0/sU/TpVDAS1GFniUL7E7+KnnaSE/TamepC58tRlOB7eKwt24Od8= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654183324352716.8727482551085; Thu, 2 Jun 2022 08:22:04 -0700 (PDT) Received: from localhost ([::1]:57650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwmeB-0001n9-AV for importer@patchew.org; Thu, 02 Jun 2022 11:22:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwmVm-00009L-50 for qemu-devel@nongnu.org; Thu, 02 Jun 2022 11:13:22 -0400 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:33391) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwmVk-0006CH-Jq for qemu-devel@nongnu.org; Thu, 02 Jun 2022 11:13:21 -0400 Received: by mail-pg1-x535.google.com with SMTP id r71so5038119pgr.0 for ; Thu, 02 Jun 2022 08:13:20 -0700 (PDT) Received: from stoup.. ([2607:fb90:80cd:3d17:bb90:8dda:8cb2:7569]) by smtp.gmail.com with ESMTPSA id x1-20020a170902820100b001618383483fsm3625159pln.224.2022.06.02.08.13.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jun 2022 08:13:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=9pazjDNhxS4z0NmOrBsgRIL8mzZfsAVnJBL6W/2yfw0=; b=ujz1gTFaCw7acDjBvXckMZMd/NfEpaQ0avmLmdKpgM1lKKrdZtQD1kqw8XR/hXXpOK DlR2vub2AiTDYSriL8rR2mpwTT1H4VVoX++ePeYdyqrrsNlPgpyCFNMOYGll6DM55NIx S6L/0w82/zclccB7MIMTO3MZufv1jyIztELMwHeyxFw5DW39FJ3rkBoHphHKqh/U0Uit +9T8zclpF/R6zn2zVXETZGYy+kxpaiiIC3ENmAWKmFYb3miAQBQbHlsd1lr6PtU36px4 p9tev2QYyNkWI/0KCS9+16DGjOlyZsTNWP8XOAzupJgBaCEYtM28smItPPJqYJybosoc mZcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9pazjDNhxS4z0NmOrBsgRIL8mzZfsAVnJBL6W/2yfw0=; b=aIOKvKphrYoF7GP33QknV4AFQyFRslRqs19DeEHCKVxUBKz1gasKe57jczgate7Fcp IbNDdQ2cgXXhIStZbK8fMzHMvQHlxZyIAHpSkXaCcoMNeV9WevxM2SEafAatyavhqvug hFlbQTL7W4NIaeehl3pSuuISlPdjtnKcj4XL/WVnCnOJfEfv24tGq1DczdREGg3/Yd1N XSFdUkc7ry8ZEoK9HwICf4DiKh8wPfRwzvpRbe/KDGn+zy3OsmMUwo5uet7Qx5VNydek grL7zMamOSoYZJrvG9G9uwExCZVBiWSmF8nXfp0meYz77exXs5pmItT7DhenvhRs6oIV K/iA== X-Gm-Message-State: AOAM5320FClJmsi71NgcxoS3/XjYDrYgQbO9KGG3hT3dCnZ+5qseAzdL hoPAivHFIt2JSEeZrrTy2EkQ5ahLjCxmjq/S X-Google-Smtp-Source: ABdhPJzN7MTqvHXsg9MVkSlyeYzxkSxnQK3XQ5WViu4LwX0gdICAfANVp9dmi6wY60m0Hcr4+ZFTPA== X-Received: by 2002:a65:488e:0:b0:3fa:289e:882b with SMTP id n14-20020a65488e000000b003fa289e882bmr4619484pgs.393.1654182799099; Thu, 02 Jun 2022 08:13:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 2/3] tcg/i386: Fix encoding of OPC_VPSRAQ for INDEX_op_sars_vec Date: Thu, 2 Jun 2022 08:13:11 -0700 Message-Id: <20220602151312.477967-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220602151312.477967-1-richard.henderson@linaro.org> References: <20220602151312.477967-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::535; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x535.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1654183326475100001 Content-Type: text/plain; charset="utf-8" We wanted the VPSRAQ variant with the scalar vector shift operand, not the variant with an immediate operand. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1022 Fixes: 47b331b2a8da ("tcg/i386: Implement avx512 scalar shift") Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index b5c6159853..d52206ba4d 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -375,7 +375,7 @@ static bool tcg_target_const_match(int64_t val, TCGType= type, int ct) #define OPC_PSLLQ (0xf3 | P_EXT | P_DATA16) #define OPC_PSRAW (0xe1 | P_EXT | P_DATA16) #define OPC_PSRAD (0xe2 | P_EXT | P_DATA16) -#define OPC_VPSRAQ (0x72 | P_EXT | P_DATA16 | P_VEXW | P_EVEX) +#define OPC_VPSRAQ (0xe2 | P_EXT | P_DATA16 | P_VEXW | P_EVEX) #define OPC_PSRLW (0xd1 | P_EXT | P_DATA16) #define OPC_PSRLD (0xd2 | P_EXT | P_DATA16) #define OPC_PSRLQ (0xd3 | P_EXT | P_DATA16) --=20 2.34.1 From nobody Wed Apr 16 07:44:32 2025 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=1654182922; cv=none; d=zohomail.com; s=zohoarc; b=j7x+WLBs6pnA7PhHD/4lqkSV+E1VzhM10JDo2UM1VoPzXft+9mziicIrVfRBWA7O6WvlBLNcR5tqiqFGnjZfa51HR3PJP0mbV+DK5POEehT8gDysLcJJ0O6JYccq0OC9jCbh5BNA1p2eeOGz3CSwMQxvscfOCrhiHARJHenf+nw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654182922; 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=pUmdC3xdEpG3uLAArNyfZRtGFvPgvzahQwuoK5N5fKU=; b=GmWAuE9bEkD23cchEE06EfsPxZ8Yh7eYOMUuAgpkOXaru8S3A8DOSNG+h8b/SRdt5+RVbOWyFUEN+D29xLIpchuxgkv/PxWAYRPlNPbCTkE1M7qasGSXJAlJADDR8gVU7XGkklol+DP0iHaW2fuRXAfRI7KK1IMS36zacDiPNcs= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654182922175820.3390641051577; Thu, 2 Jun 2022 08:15:22 -0700 (PDT) Received: from localhost ([::1]:47634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwmXg-00039B-Uu for importer@patchew.org; Thu, 02 Jun 2022 11:15:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwmVo-0000JF-L8 for qemu-devel@nongnu.org; Thu, 02 Jun 2022 11:13:24 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]:36455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwmVl-0006CV-WD for qemu-devel@nongnu.org; Thu, 02 Jun 2022 11:13:24 -0400 Received: by mail-pg1-x52a.google.com with SMTP id y187so5012554pgd.3 for ; Thu, 02 Jun 2022 08:13:21 -0700 (PDT) Received: from stoup.. ([2607:fb90:80cd:3d17:bb90:8dda:8cb2:7569]) by smtp.gmail.com with ESMTPSA id x1-20020a170902820100b001618383483fsm3625159pln.224.2022.06.02.08.13.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jun 2022 08:13:20 -0700 (PDT) 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=pUmdC3xdEpG3uLAArNyfZRtGFvPgvzahQwuoK5N5fKU=; b=HLvCvSogigM1pnqBze7MNbTZOFqJnMnf+BK8LeqmiWzfM3blhx5gGuYBKNjCNSUReY XdEdyO4mw9Ahm0bgFIvtLYdCUvRI784C+GGW9VtBG+fuzorGn65TDVEcACD8F7JNQhN8 jnwcbwd72Sn/8WxZC6IqLe9JcTnm9FyRLiES/DIh03twG77oD5rttPD7nmfk1cH7Drua aupp5uZoUvk4n0ds9zYWjqVhcH5YQer14pq0lCnEZvn4BER2mDIo1aCPXpxUfixzwGER TcyQRY9idgsoScwT37Qq1ux6HfIOMoxybdKSo8ByvBKuPQ4qF/SK2uPw91TO+K77IVfh lcgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pUmdC3xdEpG3uLAArNyfZRtGFvPgvzahQwuoK5N5fKU=; b=7dt02yF52WdgK1uZNHOKGY5GJNgodh4b2Gp21FQLvf5oaIQycn74vnx747XFswmr+A /6JC3O1WjvuniFUImxOAXH47xel4DCHSv3UtSr6hS3la3GWEzI3wkyW59BNaPlx8qKP2 p2gGjVObYdRxpK90ZQpRIwPv/OEy7NuxEM6obHjaJyNF1TbgsQVC2Aoy31cs4xlW3p37 9kNpnnhd5EyX/pn+f4uZh2UHUFfqYO2mX00YMsi8/t0hZXSRizbuS5JP+LUWrQWif98h VKQ6tdvzh9H/w/QytK7xls05ZWo9F7k+DdDe6Gs8RaMAUGcY/FGvIh6kht9bIUAbq0i6 AwDw== X-Gm-Message-State: AOAM5321IBPGwCtMFMgWAbxmBQeHuCpwpV7O+R4ZsTJVwLoDSJXv1AZJ 189hVU9nIeQ8W3Pk1hmZRhUymy1ReIjujoN2 X-Google-Smtp-Source: ABdhPJz0NvXc3+RDZqDpqCimyWpdOKaSQgpeWx9+RViX6c0212XewNQ4ZsNczkqaRC+Z2bkV5vtlFg== X-Received: by 2002:a05:6a00:1690:b0:517:cc9e:3e2d with SMTP id k16-20020a056a00169000b00517cc9e3e2dmr5670986pfc.0.1654182800778; Thu, 02 Jun 2022 08:13:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Joel Stanley Subject: [PULL 3/3] tcg/aarch64: Fix illegal insn from out-of-range shli Date: Thu, 2 Jun 2022 08:13:12 -0700 Message-Id: <20220602151312.477967-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220602151312.477967-1-richard.henderson@linaro.org> References: <20220602151312.477967-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::52a; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52a.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1654182923852100001 Content-Type: text/plain; charset="utf-8" The masking in tcg_out_shl was incorrect, producing an illegal instruction, rather than merely unspecified results for the out-of-range shift. Tested-by: Joel Stanley Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1051 Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index 61e284bb5c..d997f7922a 100644 --- a/tcg/aarch64/tcg-target.c.inc +++ b/tcg/aarch64/tcg-target.c.inc @@ -1261,7 +1261,7 @@ static inline void tcg_out_shl(TCGContext *s, TCGType= ext, { int bits =3D ext ? 64 : 32; int max =3D bits - 1; - tcg_out_ubfm(s, ext, rd, rn, bits - (m & max), max - (m & max)); + tcg_out_ubfm(s, ext, rd, rn, (bits - m) & max, (max - m) & max); } =20 static inline void tcg_out_shr(TCGContext *s, TCGType ext, --=20 2.34.1