From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20700.outbound.protection.outlook.com [IPv6:2a01:111:f403:2613::700]) by sourceware.org (Postfix) with ESMTPS id ACF4838845AF for ; Tue, 4 Jun 2024 20:10:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ACF4838845AF Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=microsoft.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=microsoft.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ACF4838845AF Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2613::700 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1717531841; cv=pass; b=N0vI1H+hWR1TeTPqWbh9oLDcekNeAUDYc+/HGS4zfXjxvh5DWLefLLHGiq+1ScV1OuZ06ubFYCyxF+SmF3p+HgEGZrrd+sKgX2mBFazOa/MW28dXww5GGYaiEQH+aUmgN42mwa32ka1kjAOOfdt12I42IEsJyHdWNhhP7qerpHQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1717531841; c=relaxed/simple; bh=HZKGiuZT1h6FlTCvetXMAyJn981MXY9wkOE97e7BjHE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Fq6bOrCjPENFnYAR5ZYG1z5kZbuXDgghJVXezCbJbKIk/L0q1KdiJaLfw+kYuadPDoaRpcTnWAaXp3s0A7QzfQ89OLUoGb3k38KlcZEvpStZA/aoBCzMsc5idzzyrVnocyHED0OwHq5VgbQaOOqv9oxi4P4pmlbP8DgSbRiTTCE= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hrMrOyBY1oZV9uVR/SeQq7ds84CRT5swEDunAvkTL4nfIJBg74ILibx7yBEPZqjisJp0mDiwxfTexc+4vmu14lla47ip+NYdboTD/O9dlYOqM6SDxuMiQdkIqLJ0vuCe7xu5iZHzSaScuXla5mKJeT16qaoIhypU5oMJIgnd5wLJZX/we9x+ShOR8jUh2UudLonmq/pNfcMZNXIHHdgtr7gwQJD8DiHYpIUbb9d/SITG32Ks01UdF+15lIpADrwqSShYn84IWnyyg2gVouBMZUjw48uzHigqQcxnZBVEF8upVmgcaQ1hOR3vPwkSRnQBLnxhY/AfYFi8/noTVCk6JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Q+6hyAXa/gygbq7k0aWm829pjkuM5y22kVwljXYPsEo=; b=ffbnEJENHDZZDbljQpVE48/wXN+0l33aTl/sSvIEYoMVSw/X92s+3UAXMDSRbUwrHxtcT7hEY26qnrfkWRSXIy4mbj75bjkX8Hw+OlNTgAXTvYou+oPWzdRObZVhwvi8nZJ1cd1DJcKIezorHyI9EUyjUedt1mBgpnWN6IA/mb7mUs8CnV/m5y34RBYaWEdqDPJWhue50QyLvi/+LUqA3MQsPesZ05cDRieA78Y8c+9oR2204ktRQ37mZFzO47eP6Uro9DQpAudweFL2SX2NXpVFPCVpd2zKvEmdfWW2sBzqAc/evxmgDI8ZACBJx1Q74FnAZgqVv1zr6pr//uqkVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q+6hyAXa/gygbq7k0aWm829pjkuM5y22kVwljXYPsEo=; b=Xf2WEokSrHT155XLe5SL5Am+M6icn6btIGPseVHQKbqaY6HR+RIPSFnBWOZnx+aTI172wrzIOpFuTXuUmN2OVehcsYKvcGN6u7Q8TPnEGuPPtbP2x9UWq9h/7gHBheUWisrhgguBgCT5+cqsL7VbSFHNWNo80vNhDcfWw9rbKlw= Received: from DBBPR83MB0613.EURPRD83.prod.outlook.com (2603:10a6:10:533::21) by VI0PR83MB0641.EURPRD83.prod.outlook.com (2603:10a6:800:212::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.6; Tue, 4 Jun 2024 20:10:31 +0000 Received: from DBBPR83MB0613.EURPRD83.prod.outlook.com ([fe80::399d:9bfc:1209:af10]) by DBBPR83MB0613.EURPRD83.prod.outlook.com ([fe80::399d:9bfc:1209:af10%7]) with mapi id 15.20.7677.001; Tue, 4 Jun 2024 20:10:31 +0000 From: Evgeny Karpov To: Evgeny Karpov , "gcc-patches@gcc.gnu.org" , "richard.sandiford@arm.com" , "ubizjak@gmail.com" CC: "richard.sandiford@arm.com" , "Richard Earnshaw (lists)" , Maxim Kuvyrkov , Radek Barton Subject: [PATCH v1 0/6] Add DLL import/export implementation to AArch64 Thread-Topic: [PATCH v1 0/6] Add DLL import/export implementation to AArch64 Thread-Index: AdqR1zLdB0RlE3SfRYWk1dD+nUW02gk4OKpg Date: Tue, 4 Jun 2024 20:10:30 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=7edbbdf7-0382-4215-8fdf-996305ff5b5e;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2024-04-18T21:26:39Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DBBPR83MB0613:EE_|VI0PR83MB0641:EE_ x-ms-office365-filtering-correlation-id: 66279774-6b9f-44e0-ffc8-08dc84d26225 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230031|1800799015|376005|366007|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?RrGFDNY0iDyF3Dl9L849OoUiSPjHO83OZixA0FrOjOqx9QZWlaT1zp7bPeBQ?= =?us-ascii?Q?JRp0pCkgX/kDbAc12QAvV+ib9co568KHsUf94JI+C5u9b2QLcDHSGlqj8jZc?= =?us-ascii?Q?ZZOGyPYYuAW+x3ue2AOeF4b3U2u96FqXtJ8NFSyxYrtMldC9usR9oWNg1TJj?= =?us-ascii?Q?D71IvQUeHzbo3Xquum+ZA6oUlyzYIbKDONvo5GFyMFJ11qLvxPyWdCU7x4vI?= =?us-ascii?Q?2TgI1/izrEIQkUcRNRr2b3yM9CbS/UbAFlb3VPUFuyLBDdLmka64nHd1KtCi?= =?us-ascii?Q?HMAoD8MhKOLwTHwmANPRFYln+mrbi5okf/n8UeB1kcJN58/zra+TmSbuclLb?= =?us-ascii?Q?pR3BJ7hx9WbhHWrwE+RXcUNoggqG6T6KEV2jT7ElGpslUS/lIKfwS+ZoZ3sF?= =?us-ascii?Q?JepEXDEdZnKJVbD8SKkqaEYU43uXNrilCImVUWZORQfY3UJ430Qd4DKoBoda?= =?us-ascii?Q?PgLCVVbB8Mwinb7yJRKpQ3HPQ/gqRBK6mexAV5BYetEztMX4xHyCEcb2j5/F?= =?us-ascii?Q?6A2hUbUufVInx32O3LrSW7ulPnwfcOAS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;SFV:NSPM;H:DBBPR83MB0613.EURPRD83.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(366007)(38070700009);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?UeX13uuF2JdI9az/bivgq2xltT+TFsM0npKxSVfo7iaQQQYhRkY2EJRej6DS?= =?us-ascii?Q?6GRZc38RVktN2rSzuWSSF7aY8IHPdS2vdpobp0wyZZ4X5YnmzCEzKTchL7iC?= =?us-ascii?Q?Ha6H4N6sUAubEI+D/6TJ+alfyDc35eBdAagOfDphIylE2ZWFA+VpfOPyW3tu?= =?us-ascii?Q?YBojD288UIep8awySpG1ZwtwvnyL2kaWhe5IkfBsro6DCtLa/FuzSMVxI/Dp?= =?us-ascii?Q?uUoAxDlMiXcOEKF9sEqoEDPH0+8nWr/Km0/AX8pEFCxEmrLVbNffbN6HsJIK?= =?us-ascii?Q?vJ+Sy+4kaPTU3i9PbkzhY/LRmDt+gFu+VWl5CIYqgCupgipRNhLTeW6MGjBC?= =?us-ascii?Q?iVMLavvUvx88c36ZKbn6hJBYoTKcuspZyvVOxsty5cfnmlrP0NKjYM2Fh6is?= =?us-ascii?Q?B4XFsK/1ZAUzACSH8hhXL+f+qqwEttMPx1imTi0cD87jeM6tltKGkn1gILmw?= =?us-ascii?Q?rCcjlTq/FviMU47LkcDoOegk2h+zJ8X1GVtXG+nAC+tUNm/PEmGUkXpmxGio?= =?us-ascii?Q?pRzjpm74UNY5WM8L+hat29V17jZBSDowDno+ncOhchj6DW3LHpCYuZY8zdGi?= =?us-ascii?Q?iDpKLIOlgZMTdjPAmEPXCrXvqjoOZCZPH8IjSGB9dUGY9ODKBWGWTj1z01RR?= =?us-ascii?Q?p0q23zyHMZE3GhPKEyAm/ZR8w7WHLH8gUwDKRGbANBlZ8rOiKFzLhhmw4GkY?= =?us-ascii?Q?QLqKXSPm3Zb++KeaiRrNKCg++OSyzASIThD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9yhDvDFMY+l19XREaPTg7QPH5WLq7MWncTy2?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DBBPR83MB0613.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 66279774-6b9f-44e0-ffc8-08dc84d26225 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2024 20:10:30.4380 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Z6Nx49nFVFZjSZE7/6TvCTwasGBEUGkBtSaUWjbl98t06kYPQC5hUtULDwNKNr4RIEetTORKeyZwHOnL/lJbzw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR83MB0641 X-Spam-Status: No, score=-8.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,GIT_PATCH_0,KAM_NUMSUBJECT,KAM_STOCKGEN,SPF_HELO_PASS,SPF_NONE,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: Richard and Uros, could you please review the changes for v2? Additionally, we have detected an issue with GCC GC in winnt-dll.cc. The fi= x will be included in v2. >> -ix86_handle_selectany_attribute (tree *node, tree name, tree, int, >> +mingw_handle_selectany_attribute (tree *node, tree name, tree, int, >> bool *no_add_attrs) > please reindent the parameters for the new name length. Richard, could you please clarify how it should be done? Thanks! Regards, Evgeny --- gcc/config/aarch64/cygming.h | 6 +++++ gcc/config/i386/cygming.h | 6 +++++ gcc/config/i386/i386-expand.cc | 6 +++-- gcc/config/i386/i386-expand.h | 2 -- gcc/config/i386/i386.cc | 42 ++++++++++------------------------ gcc/config/i386/i386.h | 2 ++ gcc/config/mingw/winnt-dll.cc | 8 ++----- gcc/config/mingw/winnt-dll.h | 2 +- 8 files changed, 33 insertions(+), 41 deletions(-) diff --git a/gcc/config/aarch64/cygming.h b/gcc/config/aarch64/cygming.h index 4beebf9e093..0ff475754e0 100644 --- a/gcc/config/aarch64/cygming.h +++ b/gcc/config/aarch64/cygming.h @@ -183,4 +183,10 @@ still needed for compilation. */ #undef MAX_OFILE_ALIGNMENT #define MAX_OFILE_ALIGNMENT (8192 * 8) =20 +#define CMODEL_IS_NOT_LARGE_OR_MEDIUM_PIC 0 + +#define HAVE_64BIT_POINTERS 1 + +#define GOT_ALIAS_SET mingw_GOT_alias_set () + #endif diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h index ee01e6bb6ce..cd240533dbc 100644 --- a/gcc/config/i386/cygming.h +++ b/gcc/config/i386/cygming.h @@ -469,3 +469,9 @@ do { \ #ifndef HAVE_GAS_ALIGNED_COMM # define HAVE_GAS_ALIGNED_COMM 0 #endif + +#define CMODEL_IS_NOT_LARGE_OR_MEDIUM_PIC ix86_cmodel !=3D CM_LARGE_PIC &&= ix86_cmodel !=3D CM_MEDIUM_PIC + +#define HAVE_64BIT_POINTERS TARGET_64BIT_DEFAULT + +#define GOT_ALIAS_SET mingw_GOT_alias_set () diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.c= c index fb460e30d0a..267d0ba257b 100644 --- a/gcc/config/i386/i386-expand.cc +++ b/gcc/config/i386/i386-expand.cc @@ -408,11 +408,12 @@ ix86_expand_move (machine_mode mode, rtx operands[]) : UNSPEC_GOT)); op1 =3D gen_rtx_CONST (Pmode, op1); op1 =3D gen_const_mem (Pmode, op1); - set_mem_alias_set (op1, ix86_GOT_alias_set ()); + set_mem_alias_set (op1, GOT_ALIAS_SET); } else { - tmp =3D ix86_legitimize_pe_coff_symbol (op1, addend !=3D NULL_RTX); +#if TARGET_PECOFF + tmp =3D legitimize_pe_coff_symbol (op1, addend !=3D NULL_RTX); if (tmp) { op1 =3D tmp; @@ -424,6 +425,7 @@ ix86_expand_move (machine_mode mode, rtx operands[]) op1 =3D operands[1]; break; } +#endif } =20 if (addend) diff --git a/gcc/config/i386/i386-expand.h b/gcc/config/i386/i386-expand.h index a8c20993954..5e02df1706d 100644 --- a/gcc/config/i386/i386-expand.h +++ b/gcc/config/i386/i386-expand.h @@ -34,9 +34,7 @@ struct expand_vec_perm_d }; =20 rtx legitimize_tls_address (rtx x, enum tls_model model, bool for_mov); -alias_set_type ix86_GOT_alias_set (void); rtx legitimize_pic_address (rtx orig, rtx reg); -rtx ix86_legitimize_pe_coff_symbol (rtx addr, bool inreg); =20 bool insn_defines_reg (unsigned int regno1, unsigned int regno2, rtx_insn *insn); diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index 66845b30446..ee3a59ed498 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -11807,30 +11807,6 @@ constant_address_p (rtx x) } =20 =20 -#if TARGET_PECOFF -rtx ix86_legitimize_pe_coff_symbol (rtx addr, bool inreg) -{ - return legitimize_pe_coff_symbol (addr, inreg); -} - -alias_set_type -ix86_GOT_alias_set (void) -{ - return mingw_GOT_alias_set (); -} -#else -rtx ix86_legitimize_pe_coff_symbol (rtx addr, bool inreg) -{ - return NULL_RTX; -} - -alias_set_type -ix86_GOT_alias_set (void) -{ - return -1; -} -#endif - /* Return a legitimate reference for ORIG (an address) using the register REG. If REG is 0, a new pseudo is generated. =20 @@ -11867,9 +11843,11 @@ legitimize_pic_address (rtx orig, rtx reg) =20 if (TARGET_64BIT && TARGET_DLLIMPORT_DECL_ATTRIBUTES) { - rtx tmp =3D ix86_legitimize_pe_coff_symbol (addr, true); +#if TARGET_PECOFF + rtx tmp =3D legitimize_pe_coff_symbol (addr, true); if (tmp) return tmp; +#endif } =20 if (TARGET_64BIT && legitimate_pic_address_disp_p (addr)) @@ -11912,9 +11890,11 @@ legitimize_pic_address (rtx orig, rtx reg) on VxWorks, see gotoff_operand. */ || (TARGET_VXWORKS_RTP && GET_CODE (addr) =3D=3D LABEL_REF)) { - rtx tmp =3D ix86_legitimize_pe_coff_symbol (addr, true); +#if TARGET_PECOFF + rtx tmp =3D legitimize_pe_coff_symbol (addr, true); if (tmp) return tmp; +#endif =20 /* For x64 PE-COFF there is no GOT table, so we use address directly. */ @@ -11929,7 +11909,7 @@ legitimize_pic_address (rtx orig, rtx reg) UNSPEC_GOTPCREL); new_rtx =3D gen_rtx_CONST (Pmode, new_rtx); new_rtx =3D gen_const_mem (Pmode, new_rtx); - set_mem_alias_set (new_rtx, ix86_GOT_alias_set ()); + set_mem_alias_set (new_rtx, GOT_ALIAS_SET); } else { @@ -11951,7 +11931,7 @@ legitimize_pic_address (rtx orig, rtx reg) new_rtx =3D gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new_rtx); =20 new_rtx =3D gen_const_mem (Pmode, new_rtx); - set_mem_alias_set (new_rtx, ix86_GOT_alias_set ()); + set_mem_alias_set (new_rtx, GOT_ALIAS_SET); } =20 new_rtx =3D copy_to_suggested_reg (new_rtx, reg, Pmode); @@ -12328,7 +12308,7 @@ legitimize_tls_address (rtx x, enum tls_model model= , bool for_mov) if (pic) off =3D gen_rtx_PLUS (tp_mode, pic, off); off =3D gen_const_mem (tp_mode, off); - set_mem_alias_set (off, ix86_GOT_alias_set ()); + set_mem_alias_set (off, GOT_ALIAS_SET); =20 if (TARGET_64BIT || TARGET_ANY_GNU_TLS) { @@ -12526,9 +12506,11 @@ ix86_legitimize_address (rtx x, rtx, machine_mode = mode) =20 if (TARGET_DLLIMPORT_DECL_ATTRIBUTES) { - rtx tmp =3D ix86_legitimize_pe_coff_symbol (x, true); +#if TARGET_PECOFF + rtx tmp =3D legitimize_pe_coff_symbol (x, true); if (tmp) return tmp; +#endif } =20 if (flag_pic && SYMBOLIC_CONST (x)) diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 969391d3013..2b3d0c8db75 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -2261,6 +2261,8 @@ extern int const svr4_debugger_register_map[FIRST_PSE= UDO_REGISTER]; /* Which processor to tune code generation for. These must be in sync with processor_cost_table in i386-options.cc. */ =20 +#define GOT_ALIAS_SET -1 + enum processor_type { PROCESSOR_GENERIC =3D 0, diff --git a/gcc/config/mingw/winnt-dll.cc b/gcc/config/mingw/winnt-dll.cc index 591e89cb5c9..c91e95225d3 100644 --- a/gcc/config/mingw/winnt-dll.cc +++ b/gcc/config/mingw/winnt-dll.cc @@ -1,6 +1,6 @@ /* Expand a SYMBOL into its corresponding dllimport, far-address, or refptr symbol. -Copyright (C) 2024 Free Software Foundation, Inc. +Copyright (C) 1988-2024 Free Software Foundation, Inc. =20 GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -206,13 +206,9 @@ legitimize_pe_coff_symbol (rtx addr, bool inreg) } } =20 -#if !defined (TARGET_AARCH64_MS_ABI) - - if (ix86_cmodel !=3D CM_LARGE_PIC && ix86_cmodel !=3D CM_MEDIUM_PIC) + if (CMODEL_IS_NOT_LARGE_OR_MEDIUM_PIC) return NULL_RTX; =20 -#endif - if (GET_CODE (addr) =3D=3D SYMBOL_REF && !is_imported_p (addr) && SYMBOL_REF_EXTERNAL_P (addr) diff --git a/gcc/config/mingw/winnt-dll.h b/gcc/config/mingw/winnt-dll.h index 19c16e747a2..0877f10d67e 100644 --- a/gcc/config/mingw/winnt-dll.h +++ b/gcc/config/mingw/winnt-dll.h @@ -23,4 +23,4 @@ extern bool is_imported_p (rtx x); extern alias_set_type mingw_GOT_alias_set (void); extern rtx legitimize_pe_coff_symbol (rtx addr, bool inreg); =20 -#endif \ No newline at end of file +#endif --=20 2.25.1