blob: 5451f091fe036839c13ec56e149bbb08360f1bfd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
//! Capture Floating Point State
const asm_fpu = @import("../../asm/fpu/fpu.zig");
const types = @import("../types/types.zig");
const FloatState = types.FloatState;
pub fn capture(state: *FloatState) void {
asm_fpu.fxsave(@intFromPtr(state));
}
pub fn restore(state: *const FloatState) void {
asm_fpu.fxrstor(@intFromPtr(state));
}
pub fn init_fpu() void {
asm_fpu.fninit();
}
|