1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Data structures and functions used by 32-bit mode.

pub mod eflags;
pub mod paging;
pub mod segmentation;
pub mod task;

#[cfg(target_arch = "x86")]
use core::arch::asm;

#[cfg(target_arch = "x86")]
#[inline(always)]
pub unsafe fn stack_jmp(stack: *mut (), ip: *const ()) -> ! {
    asm!("movl {0}, %esp; jmp {1}", in(reg) stack, in(reg) ip, options(att_syntax));
    loop {}
}