Re: What exactly do 32-bit x86 exceptions push on the stack in the CS slot?

From: Ingo Molnar
Date: Wed Nov 23 2016 - 03:58:37 EST

* Andy Lutomirski <luto@xxxxxxxxxxxxxx> wrote:

> The SDM says:
> If the source operand is an immediate of size less than the operand size, a
> sign-extended value is pushed on the stack. If the source operand is a segment
> register (16 bits) and the operand size is 64-bits, a zero- extended value is
> pushed on the stack; if the operand size is 32-bits, either a zero-extended
> value is pushed on the stack or the segment selector is written on the stack
> using a 16-bit move. For the last case, all recent Core and Atom processors
> perform a 16-bit move, leaving the upper portion of the stack location
> unmodified.
> This makes me think that even new processors are quirky.

Oh well ...