From patchwork Thu Feb 16 02:57:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 653972 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp119125wrr; Wed, 15 Feb 2023 19:00:56 -0800 (PST) X-Google-Smtp-Source: AK7set/7n4nFUqAN8H+MwtP5GPSy+VO0nMZsz9mLI8zQHRLj96YKLLdFHsyxOGhc04M328Qfh4Ao X-Received: by 2002:ac8:5b0f:0:b0:3bc:f93a:77e6 with SMTP id m15-20020ac85b0f000000b003bcf93a77e6mr6817089qtw.53.1676516455835; Wed, 15 Feb 2023 19:00:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676516455; cv=none; d=google.com; s=arc-20160816; b=ySOSKBQMejaQIEebZYa5kfejTOLryBwHtQpeSSsgkzLnG4P0n2kVxkahraTxvPzZoY xLKLygaXSmctnEKKw0EIQAs2klucZYOFUNaBbnN17w+KkLRaeKFDSHHaY78tnJAPUbny uUCcKKcIzW4EpQA0NhjPpjmyM88TKIFbaflok1Vvm7nmP5PDDHh/ELbtUYRlP8bq5iPm 5gCrm8ttEa59Z0YRT6UMjg8LLg6AtsmXFKo5VNkf1vgmm+4JZBT3P1qPNzRQ84VcnMnN wo6KVfeSnp5G6LKyIUFfSrBXoOlrJlVQQ+w4bL+hD3NhUe6edwBnc9P4yPO4THYrFSO6 M0xg== 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=/9MYkYHWZA2BK/uGhp/+Wu1+AiImWiE3k4spOtSXkSE=; b=fq7BF0xO751AOFLdXEiaK9K4FKJlo6eTJjxYk2j/BP+ngcYDQuc5IClE5WbjgFoeXz Zz4UqDgMpKeaOMkfb6vIgZQgMjQG1nfoVKRPm4ixVtt53UFYSRQ+3xzqLy1Ich2cdIKs yBu+RmzjgdEev4E5voCPFtifG6pfX6087o0+r+ykagRDL32MPLeRXrDTfej/zCAv56VY sbq+ESr4h8u2QB8x1+ycYpTDipl5rrRG3tDXXYuu3qi/Nk8ZbrY22Im9qjDwz/Q+PyG7 k+RNdbdqVcj6U7nfYCCba8P59bK3+8D2BWXxwgxSdLcPmmzhBOa47VzkiTSUnE/E8K6n 43iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WZKVtdf3; 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 y19-20020a05622a121300b003b68e9d252csi448032qtx.585.2023.02.15.19.00.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Feb 2023 19:00:55 -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=WZKVtdf3; 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 1pSUTU-0003iO-KS; Wed, 15 Feb 2023 21:58:20 -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 1pSUTU-0003fq-0Y for qemu-devel@nongnu.org; Wed, 15 Feb 2023 21:58:20 -0500 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSUTS-0005oV-D0 for qemu-devel@nongnu.org; Wed, 15 Feb 2023 21:58:19 -0500 Received: by mail-pl1-x635.google.com with SMTP id r8so708135pls.2 for ; Wed, 15 Feb 2023 18:58:17 -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:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/9MYkYHWZA2BK/uGhp/+Wu1+AiImWiE3k4spOtSXkSE=; b=WZKVtdf3zU0ANvXnRmUD0SjFo2nu7PQ3Bfn5skyEi0PNCsNWDMBD9bxxDj9SuC12kD n6Tnk4xEufGEksK1ooN0UEW6hmZV2dcBRUgsYh9JJf4hLDFuMadongk8TegFjilLt8Gv mnhOg8s6pVTFGNx2hSWADbsJr5GdB62g6xjLZNiaKzU0NQrGLZoSd8UgwEgyOTOKbERV xMhzlesHmM7nDZuYB4bkaaGcnAkDBrUc9FAPXdisqZq4rugPQe372VXVdS+GzRTH8lPW 82Q2D3k8AEqfqYvC8XwgB921z60wLmgkA8G0fQk9c1qnh3eHzzI+T/CQPndKw52Tbolp 58yA== 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:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/9MYkYHWZA2BK/uGhp/+Wu1+AiImWiE3k4spOtSXkSE=; b=3E2T6G3+spIeDjvrjp4vs2ektzt+VKLW5lHnVX1lJEEGi3HkrS7oG4If61QvlkyV0i iZRzjTcNGgwhpyrE1EbJHDIXywibGTvuKQyfprQeeXcLMUPUCLSyPCHj0qnEu06SmJOj tHbXeuXCZTZeCF10azs69pPpcOI+BPHVV/Tw1f8nl6Ip6UgZBBRPWwe99qoFpTqXVWaK KlN+ZCds5tkI8yX0elajsGNm+szDz9IVGZgBCEfCxgPHmX9+fTPZsu5x5krXiWfJOhJA wyQCRC2xxqZNQMZWIUwcU8VR5JKCnODiI0Ny2T0fwe4sQ0+zNEAt/8alMsix8Dt/wDpo JNow== X-Gm-Message-State: AO0yUKWJME/GiiE/nPWjPKKCRZzlFJQWRmp9nHKA7ReOsCxKixYJoTEB tkG4z13HZWdtcXCJuuwupFj5Q/juRuSkw7NKyBw= X-Received: by 2002:a05:6a20:8416:b0:c7:13bf:3fd0 with SMTP id c22-20020a056a20841600b000c713bf3fd0mr1363274pzd.25.1676516297101; Wed, 15 Feb 2023 18:58:17 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 18:58:16 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 26/30] tcg/i386: Mark Win64 call-saved vector regs as reserved Date: Wed, 15 Feb 2023 16:57:35 -1000 Message-Id: <20230216025739.1211680-27-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::635; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x635.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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- 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 5dcea7e198..21442c9339 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -4232,6 +4232,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 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 {