This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] x86: Apply standalone prefixes to the following instruction
- From: Jan Beulich <JBeulich at suse dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Fri, 19 Jul 2019 08:45:54 +0000
- Subject: Re: [PATCH] x86: Apply standalone prefixes to the following instruction
- Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none
- 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-SenderADCheck; bh=P7Z6M+OQFJk+KBmaQTt+dsHPDGOvk3svMGTlrOvGszA=; b=iqQavBjXOsg+r/EcKuGYzOpP60pKwnEqGYy1i8pWTX/y3I0B5xAeOK9UtwI2UI+I+8IgrEIXLZ6J1HHHyK5ikPXgv4iKR5SAtbxg9Rwqv7AgXSKQv4ToSFyo27Ol2Z/5h6ewPG6+2+xBX1lSR/6X46uCbII29dzpaaYABFGA8CRoIhxxdiXsN8mIwWHX1SFvRabwhfsKu1WUVQEAkmKdPMKuyDfqzVOlZMWWc8+0HKP+wpa8WX692HaiZDE9FEb0vxmZ8aqaSNh+b2Tz77mwD2quRLu5eokGSbrCha+edgtEAlIm/ukGu7TuxpaxzlrHF6XqcRrdMpU0H8NhSqMTJw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h2XC9XcqPBnadrqwnfaABLCsMJ59Uj5vGcF4uPWV7GLDVDvS8ePW5LfnRtdig8fr+icEXj9Ctqe5cgtHmsL88TP2SpmyTlczkJVnCJytVBGpC6qsHFOmAsc6ZVEivs4XM5iOmDz3+3DQHDNoGpNhYlf6jA8atObnVFNnzmI2/LBveFStdoEt/yBaQj4Z1IeQqX9hV6qkd5rtCssKcnJA1qSXBQNCJrBzh29spMOmADPYx1dYZ7hTWtdFbsTk1BJRYav0jkQdgn+zXe79RUSeKY6AONbUnL7NAQ0WLJ8D23ZeKoGisE2/XHL0xlF7jB4P1QKB9xfPImzTtreFyUHyUg==
- References: <CAMe9rOohqV49DVBVRr_kNTyT6ruNYJZgTCWkq4B-Bmh+VRAM=Q@mail.gmail.com>
On 19.07.2019 00:26, H.J. Lu wrote:
> Standalone prefixes should be applied to the following instruction,
> instead of being treated as regular instructions. An error should be
> issued when a standalone prefix is at the end of source or isn't
> followed by an instruction in the same section.
Commenting here, because commenting on the actual code fragments is
not easily possible with the patch sent as attachment.
For one, I don't agree that errors should be issued when switching
sections. Clever assembly programming can easily result in the
actual section later getting resumed, and an appropriate insn being
And then I'm getting the impression that the change here is going
to break things like
static inline unsigned int find_first_set_bit(unsigned long word)
asm ( "rep; bsf %1,%0" : "=r" (word) : "rm" (word) );
return (unsigned int)word;
(quoted from Xen sources), being a backwards compatible
representation of tzcnt. Just like such have shown up in the past,
REP prefixes could easily obtain meaning for other insns going
forward, so tagging individual templates with RepPrefixOk is not
going to help. WBNOINVD is a pretty recent example.