On 29.10.2021 01:26, Andrew Cooper wrote:
> The `ljmp *mem` instruction is (famously?) not binary compatible between Intel
> and AMD CPUS.  The AMD-compatible version would require .long to be .quad in
> the second hunk.

>From all sources I have the incompatibility is only with REX.W: Intel
honors it (allowing a mem64:16) operand, while AMD ignores it (using
the same mem32:16 operand form as without REX.W). All the same as for
L{F,G,S}S. Hence I do not see why the present form of (32-bit) LJMP
would be a problem anywhere.

> Switch to using lretq, which is compatible between Intel and AMD, as well as
> being less logic overall.

I certainly don't mind the switch to LRETQ, but then the reasoning
will imo need to change.

Jan


Reply via email to