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

H. J. Lu (hjl@freya.yggdrasil.com)
Wed, 25 Mar 1998 11:26:36 -0800 (PST)


>
>
>
> On Wed, 25 Mar 1998, H. J. Lu wrote:
> >
> > There are no pushw/pushb for cs/ds/es/fs/gs/ss in my Intel reference
> > manual. You can only use push %ds or pop %ds. I will fix mov in
> > binutils 2.8.1.0.26.
>
> There is no "movl" in the intel manuals either, so what's your point? We
> all know that gas syntax is not the same as intel syntax.
>
> Intel only documents "mov" and "push", but gas accepts movb/movw/movl for
> normal data access and should definitely accept movw/movl/pushw/pushl on
> segment registers.
>

I double checked my Intel reference manual. As I understand,
cs/ds/es/fs/gs/ss are all 16-bit registers. The old gas is wrong.
There are no valid opcodes for pushl/popl. It will only cause
confusion since pushl/popl mean change esp by 4 bytes.

As for mov, I will see if I can make "movl/mov %ds,eax" to work.
In the meantime, "mov/movw %ds,%ax" is more accurate. In
"movl/mov %ds,eax", the 2 high order bytes may be undefined,
depending on CPU.

H.J.

-- 
H.J. Lu (hjl@gnu.ai.mit.edu)

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