Re: [PATCH] APM support doesn't compile with binutils 2.8.1.0.24

Alan Modra (alan@spri.levels.unisa.edu.au)
Thu, 26 Mar 1998 09:20:22 +1030 (CST)


This has really kicked up a storm of messages! It's a pity I didn't
get my first patch to gas correct, and I guess I should have posted
some of my correspondence with Ian Taylor here on linux-kernel. That
may have reduced the message flood somewhat.

I have another patch which I think has the correct behaviour. Here is
an example of what my latest gas produces, assuming a default data
size of 32 bits.

instruction prefix effect
push %ds no Pushes ds register to 32 bit location on stack
%esp decremented by 4
pushl %ds no As above
pushw %ds yes Pushes ds register to 16 bit location on stack
%esp decremented by 2
pushb %ds Illegal instruction, fatal gas error

mov %ds,%ax yes Copies %ds to low 16 bits of %eax. High 16
bits of %eax unchanged
movw %ds,%ax yes As above
movw %ds,%eax yes As above, %eax is an alias for %ax as far as
gas is concerned.

mov %ds,%eax no Copies %ds to low 16 bits of %eax. High 16
bits of %eax are zeroed on newer intel
processors, older processors zap these bits
movl %ds,%eax no As above
movl %ds,%ax yes As above, %ax is an alias for %eax as far as
gas is concerned.

movb %ds,%ax Illegal instruction, fatal gas error
movb %ds,%eax Illegal instruction, fatal gas error

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu