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

Linus Torvalds (torvalds@transmeta.com)
Wed, 25 Mar 1998 11:03:01 -0800 (PST)


On Wed, 25 Mar 1998, MOLNAR Ingo wrote:
>
> On Wed, 25 Mar 1998, Linus Torvalds wrote:
>
> > So I think the APM bios access code is actually correct in specifying a
> > "l" on the push/pop operations.
>
> pushl %ds has better alignment and it pairs better with other 32-bit
> instructions. pushl %%ds does zero-extend. movl %%ds, %%eax does
> zero-extend as well, so the behavior seems to be symmetric. (i've just
> tested this to be sure ;).

No. "pushl" does not zero-extend reliably: test it on older intel chips
and you'll see (the i386 at least only wrote the low 16 bits, I think the
same is true of the 486 but I wouldn't bet on the latter). Also, look at
the behaviour of "movl %ds,mem", to see the case where it doesn't write
the high bits at all.

Linus

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