I'm trying to understand the difference between far JMP and far CALL instructions for the x86-64 CPU. If I'm following Intel documentation correctly for a 64-bit long mode:
A) Far CALL (opcode 48, FF, /3
) or in asm:
call tbyte ptr [rcx]
can be used for a "code segment" or a "call gate" call to the same or different code segment, depending on the GDT or LDT of the segment selector used. Where:
"Code segment" can specify only the same privilege (CPL) level call. It can be a call to a 32-bit compatibility mode code, or to the same 64-bit long mode (depending on the L bit.)
"Call gate" can specify same privilege level (CPL) call or inter-privilege call. But it cannot jump to a 32-bit compatibility mode, and only to the same 64-bit long mode.
B) Far JMP (opcode 48, FF, /5
) or in asm:
jmp tbyte ptr [rcx]
I can't find much documentation for the 64-bit long mode. Is it pretty much the same specs as for a far CALL?
I can't seem to find any reference for inter-privilege "call gate" JMPs into a different CPL, or being able to jump to a 32-bit compatibility mode from a long 64-bit mode.
Can someone clarify this.