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