From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by sourceware.org (Postfix) with ESMTPS id 692CB3858D1E for ; Tue, 7 Nov 2023 01:07:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 692CB3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 692CB3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d36 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699319278; cv=none; b=m7PJSXshpPGBiN0j6LkvBiejFiaQaK/0F7gF1WsWGhc+76riEfncTKA03gGOF3gFN4eMKdQrVYbbFEwmo3YZpyqW5HYNKvvDRdgYbHB6/NdNVehQQxCZCeyoZr0rZBMpHik5GRzsWSi0n3PX7wFfh5eb0PUNLNYvQC1BEoiC4yA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699319278; c=relaxed/simple; bh=rEUT8CwQ5WTLVZZgroSZl0KxdfUpg6omWPpNR3nY/EE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=mn5fwJscH/6yzlCgFzzXx5Gj9SKiCHSN7vQgMl/lx3ItKNWCvbXI3m/h/8+0QgCBd/K8kmZaXvm7yIFaS4RMVW6X9rZMNZ6G5O+kBDgXw9OC0hMpP1aHkOc7GwltnZI5whxg004H7jX5U4duKP84E/Y66DfgTeABaa1uhp5z4eQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-7a693d8de75so159065639f.2 for ; Mon, 06 Nov 2023 17:07:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699319274; x=1699924074; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=jQ/pjf/+hjLSboHNueBfa3F4cwZBkPWL6ODnlCieLco=; b=Y0frMD5Di/AChxfpLjfkcPdCX+VrluTg7zU2TtreQnNR4v1Do+7RkNTN5SQtAOJ0Eh wLRcQ+qOryddLvesww+LLAkM0dmVa2yIJ3mt+tjrHRcL3xF4Pyg4+ZQsvYTZZD2Oyh7p icWeLgzw91S3g76RQfKtPjJlHBbj/YmAdd2H0quJLwF7cvxsCCW3TQzuOvG3kklGJG2A hvz/JidRmucfPWYspoL+VIc2I3r3FTQ/D40gLRn0LoJ/XmLvNTY/xrHjY48gOLXpAAWi nfUChYOA+cjba0fhhd1BgzF6UZKqWYutM0szypOF36Oj4O4uC8VcueSL/wx+ZyBIs4nE MfEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699319274; x=1699924074; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jQ/pjf/+hjLSboHNueBfa3F4cwZBkPWL6ODnlCieLco=; b=ezyBG39GWwyTgQJksgRzv/jV4D4Cx7YULEIIqpqDQe3RmT/Rm50c7pdkRET9sZeywS 1rK4yHg9mlNstzT1kTMlV9InAuRT8B8j34mjDlK78KXRfANUh5P3XwPIm98G6zPnj/+p p8STXzRW+P+WLbgCmcALvSuoFs/jFcU8hGwiindYQLsLbnggDflAp8YLPbc3jjrrIC7x +PuwR7QI3oauIhcsV681sTItQm5kJMKgFn9nVnDOXatOe+IBerMv7Byh6RTbChNs4BFJ SMSwomdMuL662aqLlecDJonSqBH8VaIsp13628ODdIRALiZC5BYcJZi/KSfjqCm3oBwW hNlg== X-Gm-Message-State: AOJu0YyJazuJ5fCdzhrUXhD5jftbkCi3j3eIEU4zgrBx9d1YefOqYqDB wOvXn9gKJd4PcYJC2KcR4gU0j4t6ryCu0Q== X-Google-Smtp-Source: AGHT+IHRWSZM8QQhMtnAohjKLdx+MEeI3D0N43if1Ek8R1cSWNewusrJCSEsUeqP7VbcTSxYHis4Gw== X-Received: by 2002:a05:6602:2a51:b0:7a9:61fa:9605 with SMTP id k17-20020a0566022a5100b007a961fa9605mr38318702iov.5.1699319274590; Mon, 06 Nov 2023 17:07:54 -0800 (PST) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id e10-20020a05660222ca00b00790b6b9d14bsm2680733ioe.49.2023.11.06.17.07.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Nov 2023 17:07:54 -0800 (PST) Message-ID: Date: Mon, 6 Nov 2023 18:07:53 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 07/12] mode-switching: Allow targets to set the mode for EH handlers Content-Language: en-US To: gcc-patches@gcc.gnu.org, jlaw@ventanamicro.com, richard.sandiford@arm.com References: From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/5/23 11:48, Richard Sandiford wrote: > The mode-switching pass already had hooks to say what mode > an entity is in on entry to a function and what mode it must > be in on return. For SME, we also want to say what mode an > entity is guaranteed to be in on entry to an exception handler. > > gcc/ > * target.def (mode_switching.eh_handler): New hook. > * doc/tm.texi.in (TARGET_MODE_EH_HANDLER): New @hook. > * doc/tm.texi: Regenerate. > * mode-switching.cc (optimize_mode_switching): Use eh_handler > to get the mode on entry to an exception handler. Can we ever have a path to the exception handler triggered by a normal control flow and if so, presumably we want this to apply in that case too? It looks like that's the semantics of the implementation by way to using bb_has_eh_pred. Just want to make sure that's the semantics you want in that oddball case. Assuming it is the semantics you want, it's OK for the trunk, though you might want to twiddle the docs slightly to mention that case. jeff