1// Licensed under the Apache License, Version 2.0 or the MIT License.
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3// Copyright Tock Contributors 2025.
45// This is inspired and adapted for Tock from the [x86](https://github.com/gz/rust-x86) crate.
67//! Data structures and functions used by 32-bit mode.
89pub mod eflags;
10pub mod paging;
11// pub mod segmentation;
12pub mod task;
1314#[cfg(target_arch = "x86")]
15use core::arch::asm;
1617#[cfg(target_arch = "x86")]
18#[inline(always)]
19pub unsafe fn stack_jmp(stack: *mut (), ip: *const ()) -> ! {
20unsafe {
21asm!("movl {0}, %esp; jmp {1}", in(reg) stack, in(reg) ip, options(att_syntax));
22 }
2324unreachable!()
25}
2627//For CI only
2829#[cfg(not(any(doc, target_arch = "x86")))]
30pub unsafe fn stack_jmp(_stack: *mut (), _ip: *const ()) -> ! {
31unimplemented!()
32}