Message ID | 20250117182456.2077110-48-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp843997wrb; Fri, 17 Jan 2025 10:31:06 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU+j5FyrfO6Urf+anriKIZAh3WYM+e5dz8YOE9b6gvJ1x9Q75oZknAAWjkAdsnxbwF5CZVVPw==@linaro.org X-Google-Smtp-Source: AGHT+IGFK9DRIwmc0HnLJ2ZMlzrstcwHOxxbN90ANAR0aCBTdgG/fsjbwoRekSWp0mhX3DOwv6l6 X-Received: by 2002:a05:6102:571b:b0:4b4:7cb0:ac54 with SMTP id ada2fe7eead31-4b690b97757mr3492981137.5.1737138666256; Fri, 17 Jan 2025 10:31:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737138666; cv=none; d=google.com; s=arc-20240605; b=UPV7bhIy2DcqFkguf4Qe9Cyo1RWurEP7BC05ZDUlv6ReTRlt8Y1pd/4CjVmC4TtETa ObZpwdwwAhPyK0q6gGLOkTkLNkrxQMJVp2XV77S/kJ3NCqjI4xxltvdbOyejITb/zJKz 8+nAAoxEuhwX/Ut6iW22wR/tZxc66JKz/ke3mP3lWQxquvG/xrm5xIYUpiuSlWV1Aalh 9+BLGPlCZfbFFmNJ/K6w28usq9A0rg5aNiXY0HSTrqyAAIgYbIjyXEeAfHAr1LSNnoaM hKjYK/teWpzmudvaWIu14QJD2VVCll95lz5KfvT9CoElEq+VShOSVEpVz/aVNKBQpho/ T85w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=q6H6mZe5i1rQYMAvgy3QE9HZBzXOhIJyN9wM3xSG7jg=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=cTQ+eMSZQ0hbQSQF7swlVZAOc8CqnxcyJIxqe/KjigaonEMG4HhDYQd5+6xiR51sPD o2HgTm+ubPl+rOC6gt8kJ9+WMQP72vmk55m+HnIz/ww+RwIA1NBOp1k2iDjSbyoxd1wO dlyEbt+lRvClrSOYSmdP8xIYb4toHS7w81J0gmCATa28NtlmcbanvXntE2kJts3P4tir ryykt0jHqD4aGwfafb/q3o+pXPuBP7OG74ZE0AmPRpWSaSqb8fw1oaCGtOYqfoK4Fvd7 9ksMtHNfECz6GZRXqiyVcVHmm16NXpoPEx4U1eA1lRHRSjjpx4qF2XwbAtuYdc1jBMub cdlg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YDEMQZv5; 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; dara=neutral header.i=@linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4b68a3202c0si1407035137.351.2025.01.17.10.31.06 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 10:31:06 -0800 (PST) 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=YDEMQZv5; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tYr5h-0005D6-GJ; Fri, 17 Jan 2025 13:29:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1tYr5f-00050s-2G for qemu-devel@nongnu.org; Fri, 17 Jan 2025 13:29:07 -0500 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1tYr5Z-0000EF-N6 for qemu-devel@nongnu.org; Fri, 17 Jan 2025 13:29:06 -0500 Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-2ef72924e53so4221098a91.3 for <qemu-devel@nongnu.org>; Fri, 17 Jan 2025 10:29:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737138540; x=1737743340; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=q6H6mZe5i1rQYMAvgy3QE9HZBzXOhIJyN9wM3xSG7jg=; b=YDEMQZv5gGtTy3LLnfiiC0eWiuNMBgM0a4R9/v2uPD+0XeDP1xsTA/AyjejOdfVVEq O8e7tr+8KKKlU+6aeuX6LMg0nkmbJUBAu+cl1Mu9bUC5v5OXq/Rvh8skG+C0cinmHSss jK4f8PH49RSnQxdPQTloI56ahzlOwhkEq3zc8PkxP8OeSPLhJaeV3MTTskGM4+3NQR4F oWPFY8Usn5/FYfA1VpV6h1Thb19q83SZ/xqSKPxKfDVm1D46KaLfW3PCKmTh60UOv6Uv aLcxrUNxQsqURAGxOg27wJRFx9m5+DlbMXU8VoGVIHfG4TM9RxmSrNWGUNE6VE2f+VUn ZfuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737138540; x=1737743340; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q6H6mZe5i1rQYMAvgy3QE9HZBzXOhIJyN9wM3xSG7jg=; b=AvFFKs1FnRYiso+240t5Wiayql/rxZEhhrzFTGzY5HFO8Na5sDaiV9WwSBkfuyE2iz nOhHa8GK7j8VQlQrjey9IYR0SaB6x8wiJf4NCAfdMj8bpf2+/yOh6momu/X+KW75rSvD kLTdlRqlUltjSkxhMbGOSpmrV0KGDcn7gTsLuduZz6liN7GDbI+L4oD3tyFDYKznPkWO HLlMVOHoi8qSiwfaKtJCXBlz/3a0C0kFeJTYmktBns4pfPICPG5HkAUDipKlOFNrl2AG lKitRA+65s2oUvlYOKQ1fC6rLfa1dNvuKzFItHWAq+gj6cZY6jrUTxJ1xrbboI5oOHTX 0fcg== X-Gm-Message-State: AOJu0YyevKsS+yDjSr76yJc3lQ4fvLvXVapn1qo3ItALPlSw33pMcYeU Ya1tScYTsPDEQmQh1o1FYIrMp+PePp2goh3cEGrWWXRNrAhxR8luH47wq+0z4HNTmntQ7uElpzD A X-Gm-Gg: ASbGncselP0h8o+CiNizbMxZmXt1agzOKpTZsW+s1yr3ZDgHbb9+FX+fPonnArX5fii OZ9eNSvFfbUWhNEek4rG9MhHGb4tl0MfEruTv3zRIBRFXb+m9eV30zXlL1PjGHHXn/MEeGJXR+V 06dSGyy8vDpPI7QxSBn3Qm0BtXXCMvNYh6y+5poxKGhfEk2HDLQW6cLD1lg8q7XPceYKqSMtm1p GmtDc7O/Bo9i3U1tsC7x9+I9i47vtBrOQsHNjbFrpT+VIyI8NEvIFFVYHHc9CCZtgUZG9URvLkg s2gofl+lZrug4Tg= X-Received: by 2002:a17:90b:5211:b0:2ee:9902:18b4 with SMTP id 98e67ed59e1d1-2f782d4ef70mr5129078a91.27.1737138540376; Fri, 17 Jan 2025 10:29:00 -0800 (PST) Received: from stoup.. (174-21-71-127.tukw.qwest.net. [174.21.71.127]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f77629bf96sm2614105a91.36.2025.01.17.10.28.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 10:28:59 -0800 (PST) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> Subject: [PULL 47/68] tcg/i386: Handle all 8-bit extensions for i686 Date: Fri, 17 Jan 2025 10:24:35 -0800 Message-ID: <20250117182456.2077110-48-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250117182456.2077110-1-richard.henderson@linaro.org> References: <20250117182456.2077110-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,01/68] disas/riscv: Guard dec->cfg dereference for host disassemble
|
expand
|
diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index 8d1057cdb3..ed064c38d4 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -1329,16 +1329,31 @@ static inline void tcg_out_rolw_8(TCGContext *s, int reg) static void tcg_out_ext8u(TCGContext *s, TCGReg dest, TCGReg src) { - /* movzbl */ - tcg_debug_assert(src < 4 || TCG_TARGET_REG_BITS == 64); + if (TCG_TARGET_REG_BITS == 32 && src >= 4) { + tcg_out_mov(s, TCG_TYPE_I32, dest, src); + if (dest >= 4) { + tcg_out_modrm(s, OPC_ARITH_EvIz, ARITH_AND, dest); + tcg_out32(s, 0xff); + return; + } + src = dest; + } tcg_out_modrm(s, OPC_MOVZBL + P_REXB_RM, dest, src); } static void tcg_out_ext8s(TCGContext *s, TCGType type, TCGReg dest, TCGReg src) { int rexw = type == TCG_TYPE_I32 ? 0 : P_REXW; - /* movsbl */ - tcg_debug_assert(src < 4 || TCG_TARGET_REG_BITS == 64); + + if (TCG_TARGET_REG_BITS == 32 && src >= 4) { + tcg_out_mov(s, TCG_TYPE_I32, dest, src); + if (dest >= 4) { + tcg_out_shifti(s, SHIFT_SHL, dest, 24); + tcg_out_shifti(s, SHIFT_SAR, dest, 24); + return; + } + src = dest; + } tcg_out_modrm(s, OPC_MOVSBL + P_REXB_RM + rexw, dest, src); }