From patchwork Thu Jun 2 15:13:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 578114 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5806:0:0:0:0 with SMTP id j6csp642455max; Thu, 2 Jun 2022 08:17:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDCxafsX0fm5+dF6AYxiEeZ4CivdTpgLeegZ/snQdf8Phcs4GW8L9M9tyXRVlsh/d5Flh7 X-Received: by 2002:a05:620a:4727:b0:6a3:a12e:b5 with SMTP id bs39-20020a05620a472700b006a3a12e00b5mr3433792qkb.357.1654183065687; Thu, 02 Jun 2022 08:17:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654183065; cv=none; d=google.com; s=arc-20160816; b=jylMqvXIJh2O7L/0gguoG1vAtB52UFHGwiPTUwtZlcE/N5HG1Ubuj1GJld5vj6q2Y3 hVpkKYr3cODSaBjKmpO9SRsjRDYEQtWAenVkMWa4W12lal9dcDGy2z/699/JIy9FehSb fJq87v/mLMAoSQdV2QCA9YoFltruy4kRwnQEsr9CwD0YvV0pQZOwuSjpb0L/Wjo4T6F8 Cdc1Zp78WTOPZrHPHI5Iil+vQRato7OEIihtP0Gzz1FdVxe11CECx/BhXzGqUQBlE/6s tPvxUPAzyzn8p8YQ+Q8c3n8rrLJR11QSE0dF8bi0O68DRJSZT8Nh7BXOwMprhuA/dPWT SMmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4TlQd9U4tjMzAzpm7T3B0kc5/gc9CrLmX8sJ+ar9r7o=; b=vLcX8zTt3IPRW4oOLoJHAmMyAspvNMcgcEYx3SZa5nlYxFfH5axWuF5pCCt5ljOaci NgDsrZCMkJY7/5FXxYrDzmF5Jz3tpiFc32RgeIR5mpTtoO51y4UeaWHUBPbDMSEc9isY NeahdBjy9+9khebTjIGypTmHzRN5Yyj4NslfCYK4xj1RcB4L7YPlnKyXp+XF/S4fWmDL /Kv6PPqTXNcoHHuMuKcchzmhkEPbY3pv+5cTUNt20PQLgt1mlWrYHIqHeRg+itEVUCmX JerqRVhgA1zaj1oO0AcFphHzUbPBNjRFYD2ctmQJQxHRBqql1NGnZ4/BLZs8K+YvTzOQ PL5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A2goC8g5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d15-20020a05622a100f00b00304cbe0ca72si1501050qte.271.2022.06.02.08.17.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Jun 2022 08:17:45 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A2goC8g5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:50526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwma1-0005EW-7C for patch@linaro.org; Thu, 02 Jun 2022 11:17:45 -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) 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-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) 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) 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 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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); } +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) { From patchwork Thu Jun 2 15:13:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 578115 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5806:0:0:0:0 with SMTP id j6csp645233max; Thu, 2 Jun 2022 08:20:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJDommlwIS8LAZZ1Kmp+VW2q/6xdJCDJMSVXHTiOm6XiLYWCWa097zEepr/r1kSWY8fowU X-Received: by 2002:ad4:5de7:0:b0:464:4e20:10a2 with SMTP id jn7-20020ad45de7000000b004644e2010a2mr3852698qvb.5.1654183259258; Thu, 02 Jun 2022 08:20:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654183259; cv=none; d=google.com; s=arc-20160816; b=vBLa3swkoBXfhMuNAC43dzKgRrWK1Ru2ql8nJcYgSwy3DeHd6WvZOivJeCg8lg2uhW b28iDfdSkD5OknElgnJmM73lpvtehUuW0D3lOg0y3/nb8oLaBZHdRyjvSc3qujxm6Fyj BdwSwBnTzhoosYJhTMpE8NUbq+SlgSYZJ98glJVAK44F4gyB13Uv+XdjiyABO7oUimmC 04lDZbkUJNZHY1wpcvdHIpf2IhX80qDGXzmbEKFt3/7qk8caNaL5XI9YSFahjdPCZT2y RFRLxLogzuv1E9gSNLOkjdgGPp9qmkfp8KW5I0879GTckYRCjOoU40C4jGulxYEe2HuH lSVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=9pazjDNhxS4z0NmOrBsgRIL8mzZfsAVnJBL6W/2yfw0=; b=WZmnYrRD0AyFUHmrQQIy/B4GB/8XUc7Z0c4j4y01cdOquX7coiRulLzJPccLRq0rOi Fe8+ZOPNFMxmb0pCVfKcGepa34CnKQ6h36iFdy8w0J2py2OwWqsF0jWTbdmJ9dwxAVVr Q1HNviBtL2hdF9fcWjjLNOCE7T+vT1GRoaPMV2TrkJE0I+5p/sOtVe7mqvgORVFQzjq7 LuQBBzXkXks2GFz8wGla5FrHhOqvGzY5dF8sb9NnBH+Lnz+cKyn7jDhmml/M0QP2DT5W lm7mJuh5gCJeHBJXkpzHrohJuUEhBmadzJRTGwtn5SfWyX1qq0qGsEpM9QXgTOBwlawL crOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ujz1gTFa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m6-20020a05620a290600b006a6640743b0si2926033qkp.32.2022.06.02.08.20.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Jun 2022 08:20:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ujz1gTFa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwmd8-0007xX-Qs for patch@linaro.org; Thu, 02 Jun 2022 11:20:58 -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) 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-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) 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) 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 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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) From patchwork Thu Jun 2 15:13:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 578112 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5806:0:0:0:0 with SMTP id j6csp639205max; Thu, 2 Jun 2022 08:14:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwjnzideCYCDM5zeHy70JpRdOZSFuSgmqAxFf/fxRR0qFhwbvolHWzg0ffXwy/u7YdRH62 X-Received: by 2002:a05:622a:1654:b0:2f3:deaa:4d53 with SMTP id y20-20020a05622a165400b002f3deaa4d53mr3973687qtj.232.1654182875666; Thu, 02 Jun 2022 08:14:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654182875; cv=none; d=google.com; s=arc-20160816; b=szv4ZUBpXlzJuEuhaB0itJkKPki0AROXtvu4wlv/gASeQueppR7eZL+oen+FbRkTlL icVAVliHiLBK99hHwElSbIyygprArjjXHNUN5kga79a5gk8nY/RxT4FJYj0lB+vcJOIQ cMPjy0PzFbfBUkd4kjCyqIYiFxQlrovknEVz+rrCHgONMRKZMeCtv27oZHmBttGHpYH9 PcivqPu8gkbdlIkf0YSeqC+UYgzTx4DeDj2JrO+B3wfcLlCLGgKu61vmss8oB+OYM6g3 dRXOl2IIQ/4F3LJM6NSCEtQllFONnHyCEedo8LAIuUkmufBeiEM3y8lNduX+9KCZHAJa DLQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pUmdC3xdEpG3uLAArNyfZRtGFvPgvzahQwuoK5N5fKU=; b=m7lbMq86jN1KtqUOyL9CtjF5zzmGyjEL7LB5qFOy+oSHfeJmuXrS71xe/xL3keV8se FKsXHAKC3PaASFPjTjv/APHyMxG+dUKNjXQEqIU4WsskZRcezQvS4jmEl8nM5srFc2yB Qy4U15gZQr7zSwKCUjiHSMBpj0nPL5yHH1Ubh+PS6tVZjYcquoo3B1dEEERhi10vWCRH GbuimsY3WJCY5iWvQABGbtlQt558+y2LAGf13vV7kUm5hLjNnGey+My5xfI/EBMxSQGb +0+MYnHUxJOmSryPiKH7oaH10RvbUCeQuGi2xhGFQqCzC/od76ETljPnRHK8BOMxmBf2 okIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HLvCvSog; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t10-20020a05620a450a00b006a67eb4f25fsi719584qkp.406.2022.06.02.08.14.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Jun 2022 08:14:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HLvCvSog; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:43730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwmWx-0000Ns-9O for patch@linaro.org; Thu, 02 Jun 2022 11:14:35 -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) 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-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) 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) 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 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 = ext ? 64 : 32; int max = 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); } static inline void tcg_out_shr(TCGContext *s, TCGType ext,