Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2279967imn; Mon, 1 Aug 2022 18:47:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tJYLlWEmO334RNn/reDCG74O3qndEsPEXtWUfoBo3JLfR9umnXcNPxkYo+nOQNrKuUAKxa X-Received: by 2002:a17:907:7388:b0:72b:9be1:e32d with SMTP id er8-20020a170907738800b0072b9be1e32dmr14151672ejc.611.1659404851321; Mon, 01 Aug 2022 18:47:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659404851; cv=none; d=google.com; s=arc-20160816; b=UHa3+mET5nZHBJxiB1Dn0LjcNnmZrDieDdvVOz9YdcAzpn0evC/+UZE+C1Z+B+Vm99 XBBAo77lKPV//fUYxief7BwfB4LNU0DqX59ig2035LmXTuMnwg+Mg1yRWCMj1zqsRAgB Gb7mwBoX6cUvydfq+VxokqWz+qr2GlwRCU2qLs44denTsLBmPLNrxzPCBZq5BcunsVu9 dvBS9Ds0wCrEkE19L9CWkIu2E/+EJAq88kncpkZrxshoXkHoxpW2EYnOsM4zmIHrgc4s To8uQSl8R6BwjvrCkKOwHe7Kv7LpyIQv51RZGO1zKtMybuQDGTOClYZ+pkpXyKAmgHtJ sJTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=m4BhdzwzC7+bHFGqo3nqyUy3vhOiVXHqEDhohjjf7kI=; b=eTsGDqDvwslDSDBGsl1EMr/Ip1JYWOYswrTZT2lHbyNGAzXYaWrl6fLYDPgkZC+Cuq DsJw5L56Wg+XFPzms2jPqVgKZ//sFbBY3EuSzEM7NFvBTxJh70qyXGN5orE4FswTaKzu BnSctl5573ajqN3zIEUIT9zsMjyTUYA9bVr+zR94SE7BIfl8vDWzhgIrj8r4Ht8Yd8DV hXJziaLsCQEhbRb4olMdxtvl+0vtc5CsRljZURDSwmF6NTvmEyjHAIsUXdOQZUEjwrTI qnqq3ugsB4eF/Pd0ZIWzMZqT0zr+rIeDtWLaC7ZBMtZ73Vdf4tWdUlhv4lmyy5d7vKRP m1bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=ZyUXSJEW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e14-20020a056402330e00b0043d617531a4si6409767eda.398.2022.08.01.18.47.06; Mon, 01 Aug 2022 18:47:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=ZyUXSJEW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235022AbiHBBjH (ORCPT + 99 others); Mon, 1 Aug 2022 21:39:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230338AbiHBBjG (ORCPT ); Mon, 1 Aug 2022 21:39:06 -0400 Received: from xry111.site (xry111.site [89.208.246.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1805B7F9 for ; Mon, 1 Aug 2022 18:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1659404345; bh=m4BhdzwzC7+bHFGqo3nqyUy3vhOiVXHqEDhohjjf7kI=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=ZyUXSJEWhNXreu/jLfQVP1YELVdmP61ctovqsyTlamLLDb0fz+4aZafgylO7f09K9 dm7Fk+oXu0Cx8gTk15U3H5jqsHH88r+WPx5ODAAq4FG32DzKuwb5/01JNFaq+thWpH qoUACDdFM/KVyL3idCX1Pg+QEl0dxmVsxoGz6pSI= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 1D99166994; Mon, 1 Aug 2022 21:39:02 -0400 (EDT) Message-ID: <1afd44fab8dacdda7927b6e699bf74c8a1cad773.camel@xry111.site> Subject: Re: [PATCH 2/4] LoongArch: Add prologue unwinder support From: Xi Ruoyao To: Huacai Chen , Youling Tang Cc: Qing Zhang , WANG Xuerui , loongarch@lists.linux.dev, LKML , Jiaxun Yang , Jinyang He Date: Tue, 02 Aug 2022 09:39:00 +0800 In-Reply-To: References: <20220801121726.9681-1-zhangqing@loongson.cn> <20220801121726.9681-3-zhangqing@loongson.cn> <6e6a7219-8666-bd9e-770a-e60e4b329832@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.3 MIME-Version: 1.0 X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, PDS_OTHER_BAD_TLD,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2022-08-02 at 09:34 +0800, Huacai Chen wrote: > > > #define UNWINDER_GUESS=C2=A0=C2=A0=C2=A0=C2=A0 0 > > > #define UNWINDER_PROLOGURE 1 > >=20 > > Maybe it's better to define with enum type? > > enum unwind_type { > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 UNWINDER_GUESS, > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 UNWINDER_PROLOGURE, > > }; > Both macro and enum are acceptable, but enum is essentially "int", > while the "type" member is "char" here. "0" or "1" will also be "int" (C99 6.4.4.1 para 5). --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University