From patchwork Thu Feb 16 02:57:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 653964 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp118574wrr; Wed, 15 Feb 2023 18:59:26 -0800 (PST) X-Google-Smtp-Source: AK7set8aWaYl6EqK2l+QMmA045/M39PPvVgKDOgS9Ty+AAxMZJWRQH6gMRSFYEyn+AY9uwrWyvb2 X-Received: by 2002:ac8:5795:0:b0:3b6:3ad0:5470 with SMTP id v21-20020ac85795000000b003b63ad05470mr7793006qta.31.1676516365863; Wed, 15 Feb 2023 18:59:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676516365; cv=none; d=google.com; s=arc-20160816; b=LZ2UlXGLqQbhx8eqnDw00trO1wO7kvJHaf3RxvXA1VIMKDhC1DtlDmX7lSwyNTp2zP gm8EbTMHgxjP77VaH/xcrSwd79iusUeLHHotKOmNGZAdEv8yc6vyfmIRMwjuB6a0jpnw /Tv12r3aAtqwI7K73tGO4pX+b8ggXhEGcB7Ooy42x+IApnavTbjFoFe5FaT9gRIBynV8 bn7oiaP7FsTZoBWNIj/LNhjvUtCe+rSdTWIkV71DenHJYIS+bIe5bg7jLn0WfDF/9tlq hNe+QRHg2RThNUFm/bswmoW5tEJh4XstjCFU1bfEktMrqhwLMFayhTmkHiIjOorYMkgS YENg== 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=zgKVGamtNyyVi4mZ2KMjAyJ6Yx88IG+M/cd77HEWakQ=; b=arjFVTrNXJgTW7t1wa8KNQxB4hPAIqP422p7j9xvz8Obl8F3qbS9jgDD6p+snPnvrK 49Pp1HHihR+brk9N5EMGl6nAg9io3mnamPpqAfCawQcub9OuZn6m62fJtCEVFRBvpiAP +ME1hGZ5bw0UW4PHd7iokYXL3oHHLDgvd9IBGIA9Gsb67vZtSS9+cuMZm6j6YZuH+5Os /Jf6J4Tqsm0n/iTedmsX+pgVeYBxz0TlXLQV8PFmA3KHr6vW36mNLf0w+xHVMjc2Bla/ q4L0vkWTThMHrYytICl2M1FkOwfxnFrO+6VD0mbhV5djrUhCaNJAWJQoWCLSumpLHvmD 8/CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OyVbDrgu; 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 e4-20020ac84e44000000b003b9ea6c2a95si513165qtw.559.2023.02.15.18.59.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Feb 2023 18:59:25 -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=OyVbDrgu; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSUTa-0004HY-SP; Wed, 15 Feb 2023 21:58:26 -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 ) id 1pSUTY-00044t-UH for qemu-devel@nongnu.org; Wed, 15 Feb 2023 21:58:24 -0500 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSUTW-0005ps-6A for qemu-devel@nongnu.org; Wed, 15 Feb 2023 21:58:24 -0500 Received: by mail-pg1-x52e.google.com with SMTP id y186so403390pgb.10 for ; Wed, 15 Feb 2023 18:58:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=zgKVGamtNyyVi4mZ2KMjAyJ6Yx88IG+M/cd77HEWakQ=; b=OyVbDrgutGYWmP0yULW8drYpw5d+9SsVvrQ8FicDxZfK8CqeBO0ogN07vF2HHfbgEb V+GQGLyzTWxz9x9Xh+rk/atKNCcsvEw8xUX4tVcTV5SDXEgXyX6LRPVRiOpSUkU05JDC YfNc7IeuniHvBrJnMbkbDo+d7jgiPkNEugUBUdatQgjKcVMZwQXs12V/k0F+mrjwqCqS hTIzjaj7rvF7xKdkyLqKqwXhmuG/vrAO93Boi5+OK73PoRbJPvaOXm65mbhKm5+PLYun NGzqgcX4xQG16ClmyiNGK5ssXJGOwsO1hUqeEeCYc1C5deXl6ytIrYBOoRHkLWHUIf3F qIKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zgKVGamtNyyVi4mZ2KMjAyJ6Yx88IG+M/cd77HEWakQ=; b=ZV0GGnZ5hKxM6F/Iokg3wpkRl+yIL6ArSwg+pStB8u1iBOpIHR1gwKJpEWIdjopN4W rTRWyV27jDlJRuraXCFGaNBbnFp9GFuhOqftw2kAzcjQTqLLIqwR+C2gWG/BlkLtsp36 p0rQa36IKVQAEhl8eKa471lZkqjmaQxBEUG7nBhNQ0Cta8RskZtUnJqKrGKIymQ2Fa4E vUFLe3pmx2oz81QgXeqOIAALIG/N4vpJy49gxLPoZu0QqArL4Eg7jxFxRKPey6J/tnSC EmtPwqCFWjow9Ukp5vdpYxDqrXYMxVPw4LxzXKDvdyUhx6q4TcNxgwDWrYhj1zeKBMhv 841A== X-Gm-Message-State: AO0yUKWOA7uR+o1lUe0X4W18Oa3oDYSYkoZqRHsf8GhPPnPD92Tjtai/ aKUkYSNiZrw7Nl4mzU1LZSdwhdDNMljXasOIKUU= X-Received: by 2002:a62:1d43:0:b0:5a8:cbcc:4b58 with SMTP id d64-20020a621d43000000b005a8cbcc4b58mr3363198pfd.12.1676516300891; Wed, 15 Feb 2023 18:58:20 -0800 (PST) Received: from stoup.. (rrcs-74-87-59-234.west.biz.rr.com. [74.87.59.234]) by smtp.gmail.com with ESMTPSA id e14-20020a62aa0e000000b005a816b7c3e8sm89655pff.24.2023.02.15.18.58.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 18:58:20 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 29/30] tcg/i386: Add vex_v argument to tcg_out_vex_modrm_pool Date: Wed, 15 Feb 2023 16:57:38 -1000 Message-Id: <20230216025739.1211680-30-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230216025739.1211680-1-richard.henderson@linaro.org> References: <20230216025739.1211680-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52e.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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/i386/tcg-target.c.inc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index 6fdf79020f..834978f7a6 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -841,9 +841,9 @@ static inline void tcg_out_modrm_pool(TCGContext *s, int opc, int r) } /* Output an opcode with an expected reference to the constant pool. */ -static inline void tcg_out_vex_modrm_pool(TCGContext *s, int opc, int r) +static inline void tcg_out_vex_modrm_pool(TCGContext *s, int opc, int r, int v) { - tcg_out_vex_opc(s, opc, r, 0, 0, 0); + tcg_out_vex_opc(s, opc, r, v, 0, 0); /* Absolute for 32-bit, pc-relative for 64-bit. */ tcg_out8(s, LOWREGMASK(r) << 3 | 5); tcg_out32(s, 0); @@ -990,18 +990,18 @@ static void tcg_out_dupi_vec(TCGContext *s, TCGType type, unsigned vece, if (TCG_TARGET_REG_BITS == 32 && vece < MO_64) { if (have_avx2) { - tcg_out_vex_modrm_pool(s, OPC_VPBROADCASTD + vex_l, ret); + tcg_out_vex_modrm_pool(s, OPC_VPBROADCASTD + vex_l, ret, 0); } else { - tcg_out_vex_modrm_pool(s, OPC_VBROADCASTSS, ret); + tcg_out_vex_modrm_pool(s, OPC_VBROADCASTSS, ret, 0); } new_pool_label(s, arg, R_386_32, s->code_ptr - 4, 0); } else { if (type == TCG_TYPE_V64) { - tcg_out_vex_modrm_pool(s, OPC_MOVQ_VqWq, ret); + tcg_out_vex_modrm_pool(s, OPC_MOVQ_VqWq, ret, 0); } else if (have_avx2) { - tcg_out_vex_modrm_pool(s, OPC_VPBROADCASTQ + vex_l, ret); + tcg_out_vex_modrm_pool(s, OPC_VPBROADCASTQ + vex_l, ret, 0); } else { - tcg_out_vex_modrm_pool(s, OPC_MOVDDUP, ret); + tcg_out_vex_modrm_pool(s, OPC_MOVDDUP, ret, 0); } if (TCG_TARGET_REG_BITS == 64) { new_pool_label(s, arg, R_386_PC32, s->code_ptr - 4, -4); @@ -1024,7 +1024,7 @@ static void tcg_out_movi_vec(TCGContext *s, TCGType type, } int rexw = (type == TCG_TYPE_I32 ? 0 : P_REXW); - tcg_out_vex_modrm_pool(s, OPC_MOVD_VyEy + rexw, ret); + tcg_out_vex_modrm_pool(s, OPC_MOVD_VyEy + rexw, ret, 0); if (TCG_TARGET_REG_BITS == 64) { new_pool_label(s, arg, R_386_PC32, s->code_ptr - 4, -4); } else {