From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10731 invoked by alias); 15 Aug 2003 15:25:37 -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 10724 invoked from network); 15 Aug 2003 15:25:37 -0000 Received: from unknown (HELO mta07bw.bigpond.com) (144.135.24.134) by sources.redhat.com with SMTP; 15 Aug 2003 15:25:37 -0000 Received: from bubble.local ([144.135.24.81]) by mta07bw.email.bigpond.com (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with SMTP id <0HJN00H3DZS7SD@mta07bw.email.bigpond.com> for binutils@sources.redhat.com; Sat, 16 Aug 2003 00:19:20 +1000 (EST) Received: from cpe-144-136-188-60.sa.bigpond.net.au ([144.136.188.60]) by bwmam05bpa.bigpond.com(MailRouter V3.2g 44/11379113); Sat, 16 Aug 2003 00:19:19 +0000 Received: (qmail 29712 invoked by uid 179); Fri, 15 Aug 2003 14:19:19 +0000 Date: Fri, 15 Aug 2003 15:25:00 -0000 From: Alan Modra Subject: Re: 16-bit code in GAS In-reply-to: To: Mikulas Patocka Cc: binutils@sources.redhat.com, bug-binutils@gnu.org Mail-followup-to: Mikulas Patocka , binutils@sources.redhat.com, bug-binutils@gnu.org Message-id: <20030815141919.GE27145@bubble.sa.bigpond.net.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: Mutt/1.4i References: X-SW-Source: 2003-08/txt/msg00258.txt.bz2 On Fri, Aug 15, 2003 at 03:44:13PM +0200, Mikulas Patocka wrote: > The resulting instruction should have prefixes 66 and 67 and should have > 32-bit address. It certainly looks buggy. I would have expected that gas generate just the data prefix and trim the address to 16 bit. Instead we get a 32 bit address inserted into the instruction. > How can I write 32-bit code that runs in a segment with default operand > size 16 (without 'D' bit set)? .code16 addr32 movl $0x12345678, 0xabcdef01 -- Alan Modra IBM OzLabs - Linux Technology Centre