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]

Re: Glitches in gas/objdump handling of i386 STR, SLDT, SMSW instructions


On Mon, Nov 12, 2001 at 10:54:22AM -0800, Zack Weinberg wrote:
> 
> (The InvMem thingy seems unnecessary.)

True.

> There's another quirk, for backward compatibility "str %bx" needs to
> continue generating the same thing as "strl %ebx".  That gives me

I'm going to take the position that backwards compatibility isn't
required, unless you can show me some real code that will fail with the
new assembler. (*)  I see linux-2.2.x uses

#define store_TR(n) \
__asm__("str %%ax\n\t" \
        "subl %2,%%eax\n\t" \
        "shrl $4,%%eax" \
        :"=a" (n) \
        :"0" (0),"i" (FIRST_TSS_ENTRY<<3))

This is fine with the new assembler as eax is preloaded with zero.  If
the extra prefix annoys anyone, then I humbly suggest the next 2.2.x
release should fix the asm and require a new assembler.

(*) I dislike assembling something incorrectly on purpose!

Alan


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