This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 16-bit code in GAS


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]