IgrOS-Kernel 0.1.34.545
Simple C++20 Kernel for i386/x86_64
Loading...
Searching...
No Matches
fpu.hpp
Go to the documentation of this file.
1
11
12
13#pragma once
14
15
16// IgrOS-Kernel arch
17#include <arch/types.hpp>
18// IgrOS-Kernel library
19#include <klib/kPrint.hpp>
20
21
22#ifdef __cplusplus
23
24extern "C" {
25
26#endif // __cplusplus
27
28
31 [[nodiscard]]
32 auto fpuCheck() noexcept -> bool;
33
34
35#ifdef __cplusplus
36
37} // extern "C"
38
39#endif // __cplusplus
40
41
42// i386 platform namespace
43namespace igros::i386 {
44
45
47 class fpu final {
48
50 fpu(const fpu &other) = delete;
52 fpu &operator=(const fpu &other) = delete;
53
55 fpu(fpu &&other) = delete;
57 fpu &operator=(fpu &&other) = delete;
58
59
60 public:
61
63 fpu() noexcept = default;
64
67 [[nodiscard]]
68 static auto check() noexcept -> bool;
69 };
70
71
73 [[nodiscard]]
74 inline auto fpu::check() noexcept -> bool {
75 return ::fpuCheck();
76 }
77
78
79} // namespace igros::i386
80
fpu & operator=(const fpu &other)=delete
Copy assignment.
fpu & operator=(fpu &&other)=delete
Move assignment.
static auto check() noexcept -> bool
Check FPU.
Definition fpu.hpp:74
fpu(const fpu &other)=delete
Copy c-tor.
fpu(fpu &&other)=delete
Move c-tor.
fpu() noexcept=default
Default c-tor.
auto fpuCheck() noexcept -> bool
Check FPU.
Kernel text print functions.
i386 (32-bit protected mode): GDT, IDT, TSS, CPU registers
Common C++ types redefinition.