Files
unkernel/src/libkwemu.zig
JeremySu0818 7960b6ea13 feat(x64): implement dual-mode x86-64-v3 and i386 emulator core and decoded tier
Add include/kw_emu_x64.h (KW_ABI_VERSION 5, 896-byte kw_regs with YMM, XCR0, GDT TLS slots, and x87 state), dual-mode x86-64-v3 + IA32_EMULATION instruction decoder/interpreter/decoded-op tier in src/x64/, 80-bit extended-precision x87 + MMX, AES-NI/SHA-NI/PCLMULQDQ/FMA3/F16C/BMI1/BMI2 semantics, ELF64+ELF32 harness and syscall translation in src/emu/harness_x64.zig, and differential guest + unit tests comparing bit-for-bit against physical x86-64 hardware.
2026-11-29 01:48:46 +08:00

17 lines
654 B
Zig

// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (C) 2026 Pooya Parsa <pooya@pi0.io>
//! Root of the kwemu library build (static archive + relocatable object).
//! The contract is include/kw_emu.h (A64); the C ABI is exported from
//! a64/run.zig, on top of the MMU in emu/kwemu.zig.
const is_x64 = @import("kwemu_options").is_x64;
const isa = if (is_x64) @import("x64/run.zig") else @import("a64/run.zig");
comptime {
isa.exportAbi();
}
/// Safety checks are compiled out in release builds; anything that still
/// panics just traps (no formatting, no imports from the embedding kernel).
pub const panic = @import("std").debug.no_panic;