[lkml]   [1998]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] APM support doesn't compile with binutils
> In short:
> push %ds : legal, should default to 32-bit mode, no override

Does esp really change by 4 with opcode "0x1e" or "0x661e"?

> pushl %ds : legal, 32-bit, no override
> pushw %ds : legal, 16-bit, operand size override
> pushb %ds : illegal
> mov %ds,%eax : legal, should default to 32-bit mode, no override

FYI, binutils doesn't allow it. I can fix it in But according to Intel, the 2 high order bytes
may be undefined in eax. I decide not to change it unless
it is absolutely necessary.

> mov %ds,%ax : if gas notices that "%ax" is 16-bit it would be great.

Yes, it does.

> movw %ds,%ax : 16-bit, operand size override REQUIRED

Why? binutils optimizes it out. Intel says the override

> movl %ds,%eax : 32-bit, no override

It is the same as "mov %ds,%eax" in

> When moving to memory (pushw and movw to memory) the 16-bit override _may_
> be optimized away, but as explained above it definitely may NOT be
> optimized away when moving to a register because the behaviour is very
> different (I don't know whether the segment checks are for 16- or 32-bit
> entities, though, so maybe even the mov-to-memory case is different).

Which Intel manual are you using? Mine explicitly says the 16-bit
override is not required when moving data bewteen a segment register
and a general purpose register.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to

 \ /
  Last update: 2005-03-22 13:41    [W:0.071 / U:0.868 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site