Message ID | DM4PR11MB54879122CB679EE660DDBB24ECDE2@DM4PR11MB5487.namprd11.prod.outlook.com |
---|---|
State | New |
Headers |
Return-Path: <binutils-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4BBAF384A4B0 for <patchwork@sourceware.org>; Thu, 4 Jul 2024 09:38:48 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by sourceware.org (Postfix) with ESMTPS id F117D3858C41 for <binutils@sourceware.org>; Thu, 4 Jul 2024 09:38:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F117D3858C41 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F117D3858C41 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=198.175.65.15 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1720085898; cv=pass; b=UhzawCAWsC8+mYd7IPfe7mLgAoCv9gZC9g/H+vd5EGDiFughjBQG1U4hmtKEKR/EXpxqPvd1Hrh129hm2fz8Nzc7hnaW4MlQZt78GO/qB28ep01z6OPm1IdZ6plagIJQDpLowkRXV9qG8bEx03mH4tuIWeij2/LdYNYGVEKdqq0= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1720085898; c=relaxed/simple; bh=qlv3FvMjBI5nc6I++UovqrSXxf7+zx8tFHvCVfwTZTo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=PVIrPeg6xL1YGgdVMVtO8a+G/flONl76/EdcjJDXNxt2NJ/Hr7Y8b+332vsk2d7AzVsKYNdST1w1kXGU0RiH6hSGs8owfKOSBKTVzzGg+d6Fwhedi3vMuaCz2e4dmht+6AXKfuxkS4IdN/eJk1lmZEwxxTUL6CbNiPwqZViazcU= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720085896; x=1751621896; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=qlv3FvMjBI5nc6I++UovqrSXxf7+zx8tFHvCVfwTZTo=; b=PRqcDfbKJ2LXERYH33v+1y8u0Lx9uWfvn4RZtx59oWL5YR43FgSHg1sF xAQc3ynqosJ24nnBA5OUscb5f39xBZlTQP1JjBRw3kw+1MW/qci4KAME5 VQYUgG56FcmZWj1ymJ9XOHCP5w7xUASu8Gw2dFLP3DbPkzJwVAiCtmp/t xPFuYDIweXSMq+LBlXJKRrFh4QRIbiGF1oQki7brlT9wethCNJK3pfH4R dkUd1cDIML9iq1Thzei7jnguFm3+Ax75nJrVeBkL2YjomXQ3qXV2gFqiz UGiZceSrlzCSxa/NwtdblN2RLHL6eU7x/0GTYdy14zVf1wAlR29xqhyvg Q==; X-CSE-ConnectionGUID: uqzIk7HzTiCkvvUA1Tt8bg== X-CSE-MsgGUID: vj0xHsVSRtCzLnSFY0b7Vg== X-IronPort-AV: E=McAfee;i="6700,10204,11122"; a="21122099" X-IronPort-AV: E=Sophos;i="6.09,183,1716274800"; d="scan'208";a="21122099" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2024 02:37:49 -0700 X-CSE-ConnectionGUID: 3erx0t2KQeWpcnfrHiSJoA== X-CSE-MsgGUID: rknkSf5mS5ONPlPbjFRjrg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,183,1716274800"; d="scan'208";a="50993104" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmviesa005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 04 Jul 2024 02:37:48 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 4 Jul 2024 02:37:47 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 4 Jul 2024 02:37:47 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 4 Jul 2024 02:37:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q6ktc9L2mZUi4mx6SSUJx6qVWd9Vp+W8n+43lC5VT4cugQgEIAPk768Jbu9Cfo+RcsOc7qOqXdvX2HFfhlmGByBKzt6PhHnKPSTReLGDxnzDyNopQ8VIGMCBIGVmH7dej2iBTKAIkhm1RrNraEDc/UqTYNwvyPpDr1VdagfiC3H7zxyy7IBi1apthJPTtMh4STpb7k1ZHSJJS/00aSX0QNRFDuCJT2r7LZK106yd05zPnWmg8ZfIhPcrQuK6MF7Sp/Mge9pXWOZ1NSWMA1TgBz5OVkyb0mznj1SlrA6ZBdIrADw0Q/lwGsarJgyePSQnhPQki/05E+iJHAofOeI1IA== 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=Nc5HrVmJ2yUVv6GFpXpeNdCIPlfzhkIqn4S5g4EdjtA=; b=Y8WPJ/p26xwjRbPidIzeYpvA+IYgG4AtSOWU+5webDzQOORGdspPJyo+QKVbaELOwJQ0q5GdiYVIvygsCfZmhlLJaeZBrUkX98GdYlc76xpi0k2eD8UAXgDL2Tg8tRHjZTRHgmVcDrG0CA2Bb0kcC07hMBrLEjjIsgmegR2PvGWdP84YjDXASw+E0AIxCP3jp2TLxPD66ROErZdTkGaLMMgXgbqBBNzycKZYYFW2FsN7DZcy9rK3SXZMjOjTEiYURdAYRhtswwAqmk+uTpwcgu2aHAyo1wEcIsOB29sTNW+jPorN+0yfXD1Zcl50cXzUHM6F1us3GFsjbrf86vrHsA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM4PR11MB5487.namprd11.prod.outlook.com (2603:10b6:5:39f::22) by DM6PR11MB4641.namprd11.prod.outlook.com (2603:10b6:5:2a9::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.32; Thu, 4 Jul 2024 09:37:43 +0000 Received: from DM4PR11MB5487.namprd11.prod.outlook.com ([fe80::8221:de1b:c203:95d2]) by DM4PR11MB5487.namprd11.prod.outlook.com ([fe80::8221:de1b:c203:95d2%7]) with mapi id 15.20.7741.017; Thu, 4 Jul 2024 09:37:43 +0000 From: "Kong, Lingling" <lingling.kong@intel.com> To: "binutils@sourceware.org" <binutils@sourceware.org> CC: "Beulich, Jan" <JBeulich@suse.com>, "H. J. Lu" <hjl.tools@gmail.com> Subject: [PATCH] x86/gas: Fix APX TLS IE restrictions Thread-Topic: [PATCH] x86/gas: Fix APX TLS IE restrictions Thread-Index: AQHazfXSHkx8QPtZz0q86yJrnccPzA== Date: Thu, 4 Jul 2024 09:37:43 +0000 Message-ID: <DM4PR11MB54879122CB679EE660DDBB24ECDE2@DM4PR11MB5487.namprd11.prod.outlook.com> References: <20240704091952.1319058-1-lingling.kong@intel.com> In-Reply-To: <20240704091952.1319058-1-lingling.kong@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR11MB5487:EE_|DM6PR11MB4641:EE_ x-ms-office365-filtering-correlation-id: 03b221a6-1ce1-4131-af85-08dc9c0cf4af x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: lTrzoZYmmgmFHtnXm/Dovb9rxKrlR8rXkMDkdxN8KtyKAi78+QuSotq9m9zc02HaZj9nvQMgrplIJynPI46Nw1IOYff7GJVqXrW1O4fXPcI+A69/+qdjQgKl7VUXyAH+AvVryofFLE27TLomCvV+EdkhjRWy+AY9UAwSeOE6erNwEFdMWY/nJgXiuWsIMrqA8zhyFr8mx3C+dblLNC9J3XlsfybU4kk5XTzpBRpLYVEGRvg3kOfyj3+NZc7QRFUtS6cLjNJ1wfk/miBcseBopH3YxX1sBGzuIf8P+99bbR5RPEblopvKE7nrH0rAsFFk/V+JzuEf+MVUmV07hkzO0MuoaeJKbM0gBYU+3tN9Qu/RS/gHR2JKnM1eBJdrO58Gjs90Ysbc4OdhenPkEJHLLik81QoLuYnuEXoMGh4S+cnSVHTM0RTcUCaVE/tGEPS5TUgRP3cX4SNgAsDG3hfcnG2xcHe6p/O66AYYxIsOBTdU/J8zJkw8FyGJVcPs2qnnC25jgeqLaf9UkaYVD7jiLzZBabxZthsu7IF3fQIbhRTjoeYXncGzGsctmxGLnszG/AqLrCBkWhKWGo8BpHYobLNlZ3FksIZFQM75atZUwjXYWHLvu57rrPWNQYhE7YaykrL64N9/ebLZYSrNkKaUCuJVaxy+POppToQoE1mB5v5jN8Qpsa7D3Jn3AgpFxlEx8eLfLxbyi91raG8+U+2ZYtZvzgYDZgp0NjdyUUksBnRovvQRsBzogNehIHOLXMyycNm4V0YEAQpEpQNJCVT0wtyj2qRJml+k20FF/KU5nA0OsXWkh/w9qeKpWZeAQGp7vACGAaDt64/O6HQJQndsw9zHM00KOdSUYB9u8RGNTLa+Gd0LjVSpEubrSkBAHYhFwSAB4AaqtnBj48nZ0L7V1wMMnX02AvdlQutj8qchgDr9hB1gK9r+ZCFdEqoyX/XPSLFzUHvcCEbW6bSpWjH+WjSCgO6AwyMA14q75Y3FLrdCqA0TTbzmSwc88aar9fHeHnUqIfjRiCBirIOsSEUL4HpdKKvPvjc9fN8p4B5TwdbRJaUqCY+hMhloptmY59Wxv+lT1Ae4yz83COQ727piUxI0Uzyn5Scg9c6jqc+YuisWl0SRLYQyFvOVSbyAEGmjcsmD6V0f4N2XaTsdMBN/ZT6vLtWRrD/Og4ZcKp0qjKM7MmahrPrt6cwXFSEqKx0b84nZ9E+yFTTDUnZRCfEt5kaYL/ue8wTlmFulFU3INhI+JBmgriqmuAiNjx8CYthaNUIRl2FqL1mUXWNiYj/LtYzWJGiJUzRgIDKhmJJvZgvsQTpeyEh2fIo69iAcuL0+2Oc31tyP0wcpS6io2X6ZU7sTVgoPTVkwQNcTeJpQvjjKTCZGd30SsWzFGNIIlT3+bQzFTcRF3n3sWKq1EqRiSg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5487.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: qqxtCiVEZKlr0O0N2FP8yKCATiZFsMQI7O7jpeJGMt6UpSumKsjT6tTMycfAT6lopHT4fysBJslD7/a8G2loU7Ato7FygcqIPf/MdwW3jZ/Cbq2I/uUVZUO3RH3S+XvSgBqrKS2oEYPKEdFrQyE2FXmyZct9MjfAXAE/vDUpOwqM6oGyIvyfc4/D5XtHzWy0JDTDjvAqMgABKkAMLVqQqBaLfKNSljXT2dYLCtRs+jCw++eXQNYtGjdon8WOgPbl9wwqvoDcM1gizTXITIC8HfY3DDRrYzM+cF0/XyjthY9DYz8KyA2FmAMDb2fAA0XEDvIuUgHoyBbq6mY3K24cnKadevxjz54Xr6QRggJIc7nx2M116ag9y5+xWkAwWzmDs30R/bi08uvUlcxte99S48Z/+T6bp6jUQq2ZnewehlIYnFyIb9XWPpfh5/Q1xGqMh8YffVlthbV22695e8uGnHC3z+OWB5o0p9GtY7Wiiy12RHvpE4ZY6BNTge1b9BgJyiWmRuoWqzYRiv7zbhHX4Y8Tws7cTqkAcma7Kb8KNi7D0KYC1CoiKqO1UnX4ccK2qRUg1NO/ZTwzUQJFeAJBtQmYBC/u/LoHbRC2KFnRMM4nThY07gjdW/oZGI+A98DukdA4pMIoDDVf7rlrgLvzilXl2xcB7QAffj4qvV/xeQclwTT7Rcq6kq5EV2sHzIsK62oqdYJ2mxJxPw6P7VDfCQlEUSNuz7A5Q9UfoXsOm951pX8eXp4BVfQnka1wD+biLsHFzngBl0YepgIVsP3q6aWwaX6yFuN74g+FViYspWtKKE1exQLplvo7YSYnCVSFtyuhbGILyU2C0EVkMj7WfzD9kgRzIDyPyW4TW2iSQSRDFURshpi3ARsdi+nGLYUjIaMT3rD0B6TI/k3lyywwXMencqjYW3fYrIP90rVdyn7P2BKYLvE0qgrZ0yTKcBzdeu3qzKRlmfmPSonHHsO7Pe7rrXbMW23J2zTUdQgC+l/JciVfhNDS58mI1GI00TovELIgfeYLOTSh/XhYNFiIw2NgGqwX+NRKYv+s99MXQ5mjT/LS/PWLIvr3SFMLxr+FjQ090VFaZpaHReM9pJA2BiDZmZJaz4B4/WvxMPNx+dXK0se7D5aX77kQglN/PtoWdRGfEer5XVv0Seh6s4wGPHQYpaQCZxT0vKGgVJ+NY/YKxiGuHnjobVLvQkEt1VdW6Rxukz1tgDzbSzydKCAP7VPNILAuS7mSEiPy3UoIIA19+JLOpMzaah1Soz2xLly/ZNBnKQpazCfj+81zfYcPr7vc0ycZePtVbAI7lVrCC8ogrlk/8vwdfhrZEuAtdqgQLdg721AQs0RdpBrGZalOLzzgOMba2L9Ll5520APNgsVaWaJgJljdGhZLuHUtM826R1qH+ek0qfFxYE/UlFCI6bLAcAPUoDn3NrTpswwYl85cBnLKfipeGaeXMe0UkkUwWphOL6uZAwDDoVffxmB59ERCpoG0Uw5nPPTmBS3meTVluOcOtVzX5hfb9GneX3QZZzmkvaKtwZ8A2vjUinDTBhozWqUzFyHhdcgF46GFg6afztTAvrI7k1+0+6iHfJHn Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5487.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03b221a6-1ce1-4131-af85-08dc9c0cf4af X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jul 2024 09:37:43.8047 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: J67aicNwWvfWKAtTSRotPeJl3pFXSDffz47mpSfkXw6AHGdYtXDs26t/sp9ZOjWfIuhFLVfroFTw6i1JuxIW1w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4641 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org |
Series |
x86/gas: Fix APX TLS IE restrictions
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_binutils_build--master-arm | success | Build passed |
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 | success | Build passed |
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 | success | Test passed |
linaro-tcwg-bot/tcwg_binutils_check--master-arm | success | Test passed |
Commit Message
Kong, Lingling
July 4, 2024, 9:37 a.m. UTC
Add the restriction in assemble for APX TLS IE that the destination can only be a register. gas/ * config/tc-i386.c (md_assemble): Added stricter restrictions for APX TLS IE. --- gas/config/tc-i386.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.31.1
Comments
If there are no comments, I will check it by the end of today. > -----Original Message----- > From: Kong, Lingling > Sent: Thursday, July 4, 2024 5:38 PM > To: binutils@sourceware.org > Cc: Beulich, Jan <JBeulich@suse.com>; H. J. Lu <hjl.tools@gmail.com> > Subject: [PATCH] x86/gas: Fix APX TLS IE restrictions > > Add the restriction in assemble for APX TLS IE that the destination can only be a > register. > > gas/ > > * config/tc-i386.c (md_assemble): Added stricter restrictions > for APX TLS IE. > --- > gas/config/tc-i386.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index > 3b4d9cacc2e..2382db23e19 100644 > --- a/gas/config/tc-i386.c > +++ b/gas/config/tc-i386.c > @@ -7544,9 +7544,8 @@ md_assemble (char *line) > && i.mem_operands == 1 > && i.base_reg > && i.base_reg->reg_num == RegIP > - && i.tm.operand_types[0].bitfield.class == Reg > - && (i.tm.operand_types[2].bitfield.class == Reg > - || i.tm.operands == 2)) > + && i.reg_operands == (i.operands - 1) > + && i.types[i.operands - 1].bitfield.class == Reg) > /* Allow APX: > add %reg1, foo@gottpoff(%rip), %reg2 > add foo@gottpoff(%rip), %reg, %reg2 > -- > 2.31.1
On Fri, Jul 5, 2024, 11:11 AM Kong, Lingling <lingling.kong@intel.com> wrote: > If there are no comments, I will check it by the end of today. > > > -----Original Message----- > > From: Kong, Lingling > > Sent: Thursday, July 4, 2024 5:38 PM > > To: binutils@sourceware.org > > Cc: Beulich, Jan <JBeulich@suse.com>; H. J. Lu <hjl.tools@gmail.com> > > Subject: [PATCH] x86/gas: Fix APX TLS IE restrictions > > > > Add the restriction in assemble for APX TLS IE that the destination can > only be a > > register. > > > > gas/ > > > > * config/tc-i386.c (md_assemble): Added stricter restrictions > > for APX TLS IE. > > --- > > gas/config/tc-i386.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index > > 3b4d9cacc2e..2382db23e19 100644 > > --- a/gas/config/tc-i386.c > > +++ b/gas/config/tc-i386.c > > @@ -7544,9 +7544,8 @@ md_assemble (char *line) > > && i.mem_operands == 1 > > && i.base_reg > > && i.base_reg->reg_num == RegIP > > - && i.tm.operand_types[0].bitfield.class == Reg > > - && (i.tm.operand_types[2].bitfield.class == Reg > > - || i.tm.operands == 2)) > > + && i.reg_operands == (i.operands - 1) > > + && i.types[i.operands - 1].bitfield.class == Reg) > > /* Allow APX: > > add %reg1, foo@gottpoff(%rip), %reg2 > > add foo@gottpoff(%rip), %reg, %reg2 > > -- > > 2.31.1 > I opened an assembler bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32022 Assembler should reject instructions which won't be accepted by linker. > >
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 3b4d9cacc2e..2382db23e19 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -7544,9 +7544,8 @@ md_assemble (char *line) && i.mem_operands == 1 && i.base_reg && i.base_reg->reg_num == RegIP - && i.tm.operand_types[0].bitfield.class == Reg - && (i.tm.operand_types[2].bitfield.class == Reg - || i.tm.operands == 2)) + && i.reg_operands == (i.operands - 1) + && i.types[i.operands - 1].bitfield.class == Reg) /* Allow APX: add %reg1, foo@gottpoff(%rip), %reg2 add foo@gottpoff(%rip), %reg, %reg2