From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24454 invoked by alias); 27 Mar 2005 23:56:09 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 24376 invoked from network); 27 Mar 2005 23:56:04 -0000 Received: from unknown (HELO perpugilliam.csclub.uwaterloo.ca) (129.97.134.31) by sourceware.org with SMTP; 27 Mar 2005 23:56:04 -0000 Received: by perpugilliam.csclub.uwaterloo.ca (Postfix, from userid 20006) id 86482A861E; Sun, 27 Mar 2005 18:55:44 -0500 (EST) Subject: Re: i386/x86_64 segment register issuses To: binutils@sources.redhat.com Date: Mon, 28 Mar 2005 10:39:00 -0000 MIME-Version: 1.0 Message-Id: <20050327235544.86482A861E@perpugilliam.csclub.uwaterloo.ca> From: rridge@csclub.uwaterloo.ca (Ross Ridge) X-SW-Source: 2005-03/txt/msg00810.txt.bz2 > asm volatile("movl %%gs,%0" : "=g" (gsindex)); > >The new assembler will disallow them since those instructions with >memory operand will only use the first 16bits. If the memory operand >is 16bit, you won't see any problems. But if the memory destinatin >is 32bit, the upper 16bits may have random values. I'm pretty sure this isn't the case. The memory operand can only be 16-bit, as any operand size prefix (or lack thereof) is ignored. It's only when the destination is a 32-bit register that the upper 16-bits are undefined. I think gas should accept both "movl" and "movw" when moving between a segment register and a memory operand. Regardless of which suffix is used the assembler should never emit an operand size prefix for the instruction. Ross Ridge -- l/ // Ross Ridge -- The Great HTMU [oo][oo] rridge@csclub.uwaterloo.ca -()-/()/ http://www.csclub.uwaterloo.ca/u/rridge/ db //