From patchwork Fri Nov 18 09:47:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 626125 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp35618pvb; Fri, 18 Nov 2022 01:58:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf5Sl9yXAOQ1TrBUeEUTJDwb5OuWAa+kISC9u4adGFsoE2L5YqF4ufZOhUNaYUudD6csr+xB X-Received: by 2002:a37:d241:0:b0:6fb:b9aa:f345 with SMTP id f62-20020a37d241000000b006fbb9aaf345mr5137466qkj.30.1668765496823; Fri, 18 Nov 2022 01:58:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668765496; cv=none; d=google.com; s=arc-20160816; b=j0CFrTjYhOVLIfOhVESaE8YLCzjGi4wIF40NWELfPDGmrSQ4zMpOwZkPxwT7Z2sc+g I1cafAzbXDgaqoI5BAgE+mFVPL+TvEi0cADWLsxYdVY6cSgerPbVZM3Y1q/+KKG175O1 Q/rHJ5pkCLQw91Ly56vR5dsDMw5is167j7GCu5dsD48kPBg9KEwltVpGb706LqcZcA2y 9c03BhC36xdpfGhErQv4PL3QEzBF1hhlg1FsT2B/XhEUrwapUKP7BZPTBNetY+V9pYjZ Mlv0AtDSBFcNzt3pENT+9EZksR2nH96MYXxw11VWxEqmXHeP4IYLf77g/NnI8OyyeImJ sodQ== 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=t0Huvl5EDl6S+kJ/E4VV+nKvSC60vdV8IvOI3pEWJ4w=; b=qJJ7enTmNnLwfAQg53bl+Xr1SJwrs+NIFP57aVgf9qbVIZQOF85QtELxw9KxsE3YFY R2jNy4cFomp4aZ4hCgTDdk3GyZB4VIlTHALGtz/eaxHa/SHuF81X4HwrjdvTQqv2ycSk TGfR7k0S9k4wU2cWKGvw8+KuUKQF+ZTlKf6fE+6mZm9uDFodVcceCm+W1I2FmwxRx1jB TB/Vq3Mj3YRv40tNowfNbIkUt+FS0TCzdHUK6QZlsQX8+eMHhP67lE/H5PDNtf+heHpP nh7lHnaIFkDnGK17qmQsheVHFCbo0KRIrdoDFOHFJPRxeRLd4RUZMQYzmPHAyecUhCoj n3nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=opL7CccQ; 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 gu10-20020a056214260a00b004b1d2231adbsi1800725qvb.5.2022.11.18.01.58.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Nov 2022 01:58:16 -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=opL7CccQ; 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 1ovxzj-0007wu-3d; Fri, 18 Nov 2022 04:49:11 -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 1ovxzJ-0007gx-Lu for qemu-devel@nongnu.org; Fri, 18 Nov 2022 04:48:45 -0500 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ovxzI-00027s-3j for qemu-devel@nongnu.org; Fri, 18 Nov 2022 04:48:45 -0500 Received: by mail-pj1-x1032.google.com with SMTP id b1-20020a17090a7ac100b00213fde52d49so4574316pjl.3 for ; Fri, 18 Nov 2022 01:48:43 -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=t0Huvl5EDl6S+kJ/E4VV+nKvSC60vdV8IvOI3pEWJ4w=; b=opL7CccQ+GmlM2XHZaoSy4bBoFojwd3rmF1hM8Xtmh5sNvqE8vH9zAPtb+NB7gtqx1 gBQDRZ2+vjFzSKAtsOcSpY3vkYRiO1P/WT0bb6I0nsHDhoU6wWWX/+AXO4R7klbSScSB AarXJSNreaYNCIJYOM6IWeS1WYLFaoiPVPn/PCHkZ3wHJhx8CXBOYSdK4K9hDMXsO7A9 fcBtqyFZGmrwT33VNWB7HDXlQ/169CN2g5xoog5uSv4Vx51DaFVRSAuSBxMlb+mIqFi+ FcyCp6gIuOhuzrISTE47/3yPtybZ99neWmuKrdQrcZRqfCG2USFofX/zRGqDhIVUOMLn pVSQ== 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=t0Huvl5EDl6S+kJ/E4VV+nKvSC60vdV8IvOI3pEWJ4w=; b=CahMuHi8HPhfvM225Dqk2jr6AdiNSkRb1ryvw1zfup39tX3zMrqQE7d9rmhBRO1abg JaKGljeB5MG71/D28581CD4DKekPf8ly/gRKL5FVfO78gZaD6gEh+GoV0AdGK3Y+vaTK sCzRWs9wzh3qhwVXf2/B1DtoXKch9q7mz/SKrxXhBRbwtUYviHokTThyitJjPcrpPXsI NStzithC7MGiKR0leSJBnENo2R7Ou9Jz/5i1dwkpjEwmwxNNZEmoNn3GYYYLgkcdZJu8 uztAxQxKOie0QgEqbD+i8EAiBS2hruplGdY6xazFkw+MmHXvoJjRdsmRCGemyCfeIv1I kUag== X-Gm-Message-State: ANoB5plbJ9lC+dtXIkn+ShPK7r2rkP5mC+SbRDBoiEYpBmPSmaGAfrBi Hn4gn5WEAjn+XAhgLmToHcvasq18WmnWFA== X-Received: by 2002:a17:902:7d88:b0:186:5c72:1081 with SMTP id a8-20020a1709027d8800b001865c721081mr6799264plm.71.1668764922881; Fri, 18 Nov 2022 01:48:42 -0800 (PST) Received: from stoup.. ([2602:47:d48a:1201:90b2:345f:bf0a:c412]) by smtp.gmail.com with ESMTPSA id n12-20020a170902e54c00b0018862bb3976sm3115421plf.308.2022.11.18.01.48.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 01:48:41 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-8.0 25/29] tcg/i386: Mark Win64 call-saved vector regs as reserved Date: Fri, 18 Nov 2022 01:47:50 -0800 Message-Id: <20221118094754.242910-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118094754.242910-1-richard.henderson@linaro.org> References: <20221118094754.242910-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1032.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 While we do not include these in tcg_target_reg_alloc_order, and therefore they ought never be allocated, it seems safer to mark them reserved as well. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/i386/tcg-target.c.inc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index e38f08bd12..e04818eef6 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -4224,6 +4224,19 @@ static void tcg_target_init(TCGContext *s) s->reserved_regs = 0; tcg_regset_set_reg(s->reserved_regs, TCG_REG_CALL_STACK); +#ifdef _WIN64 + /* These are call saved, and not we don't save them, so don't use them. */ + tcg_regset_set_reg(s->reserved_regs, TCG_REG_XMM6); + tcg_regset_set_reg(s->reserved_regs, TCG_REG_XMM7); + tcg_regset_set_reg(s->reserved_regs, TCG_REG_XMM8); + tcg_regset_set_reg(s->reserved_regs, TCG_REG_XMM9); + tcg_regset_set_reg(s->reserved_regs, TCG_REG_XMM10); + tcg_regset_set_reg(s->reserved_regs, TCG_REG_XMM11); + tcg_regset_set_reg(s->reserved_regs, TCG_REG_XMM12); + tcg_regset_set_reg(s->reserved_regs, TCG_REG_XMM13); + tcg_regset_set_reg(s->reserved_regs, TCG_REG_XMM14); + tcg_regset_set_reg(s->reserved_regs, TCG_REG_XMM15); +#endif } typedef struct {