From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21280 invoked by alias); 16 Jul 2006 17:13:35 -0000 Received: (qmail 21210 invoked by uid 22791); 16 Jul 2006 17:13:34 -0000 X-Spam-Check-By: sourceware.org Received: from smtp105.sbc.mail.mud.yahoo.com (HELO smtp105.sbc.mail.mud.yahoo.com) (68.142.198.204) by sourceware.org (qpsmtpd/0.31) with SMTP; Sun, 16 Jul 2006 17:13:32 +0000 Received: (qmail 26002 invoked from network); 16 Jul 2006 17:13:30 -0000 Received: from unknown (HELO lucon.org) (hjjean@sbcglobal.net@71.146.109.150 with login) by smtp105.sbc.mail.mud.yahoo.com with SMTP; 16 Jul 2006 17:13:30 -0000 Received: by lucon.org (Postfix, from userid 1000) id 1C20064374; Sun, 16 Jul 2006 10:13:29 -0700 (PDT) Date: Sun, 16 Jul 2006 17:13:00 -0000 From: "H. J. Lu" To: binutils@sources.redhat.com Subject: Re: PATCH: Remove InvMem from MMX/SSE instructions Message-ID: <20060716171329.GA29871@lucon.org> References: <20060713230903.GA24686@lucon.org> <20060716035356.GG18571@bubble.grove.modra.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060716035356.GG18571@bubble.grove.modra.org> User-Agent: Mutt/1.4.2.1i Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00197.txt.bz2 On Sun, Jul 16, 2006 at 01:23:56PM +0930, Alan Modra wrote: > On Thu, Jul 13, 2006 at 04:09:03PM -0700, H. J. Lu wrote: > > http://sourceware.org/ml/binutils/2001-05/msg00065.html > > http://sourceware.org/ml/binutils/2001-05/msg00187.html > > > > use InvMem on source operand to indicate that it must be register. > > I don't believe it is correct since RegYYY won't match memory anyway > > and InvMem is used to indicate how operand should be encoded. This > > patch removes it. > > It's true that the way the code is currently written that removing this > flag will not change the insn encoding. All InvMem does on *source* > operands of these reg->reg insns is document that the register is > encoded in the regmem field of the modrm byte. So why do you want to > remove documentation? There is certainly nothing wrong with InvMem on > these operands. Those operands only take registers and are encoded properly. What additional information does InvMem provide here? I am trying to clean up the usage of InvMem. The commennt says: /* InvMem is for instructions with a modrm byte that only allow a general register encoding in the i.tm.mode and i.tm.regmem fields, eg. control reg moves. They really ought to support a memory form, but don't, so we add an InvMem flag to the register operand to indicate that it should be encoded in the i.tm.regmem field. */ #define InvMem 0x80000000 However, there are {"sldt", 1, 0x0f00, 0, Cpu286, wlq_Suf|Modrm, { WordReg|InvMem, 0, 0} }, {"smsw", 1, 0x0f01, 4, Cpu286, wlq_Suf|Modrm, { WordReg|InvMem, 0, 0} }, {"str", 1, 0x0f00, 1, Cpu286, wlq_Suf|Modrm, { WordReg|InvMem, 0, 0} }, Those instructions take memory operand. InvMem seems to be used for something else. H.J.