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: i386/x86_64 segment register issuses


> The assembler in CVS generates the same binary code as
> 
> 	movw %ds,(%eax)
> 
> for
> 
> 	movl %ds,(%eax)

Which is the way I think the GNU assembler should work.  In case like
Linux kernel code you quoted, you really do want a 16-bit move when a
memory destination is used and a 32-bit move when a register destination
used.  The only problem here is that the Linux kernel doesn't ingore
the higher 16-bits of the resulting variable, which aren't guaranteed
to be zero in either case.

							Ross Ridge


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