aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/kernel/cpu/ss.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/src/kernel/cpu/ss.cpp')
-rw-r--r--arch/x86_64/src/kernel/cpu/ss.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86_64/src/kernel/cpu/ss.cpp b/arch/x86_64/src/kernel/cpu/ss.cpp
index b7e52e1..9c8dd61 100644
--- a/arch/x86_64/src/kernel/cpu/ss.cpp
+++ b/arch/x86_64/src/kernel/cpu/ss.cpp
@@ -1,6 +1,6 @@
#include "arch/kernel/cpu/ss.hpp"
-namespace teachos::arch::memory::cpu
+namespace teachos::arch::kernel::cpu
{
segment_selector::segment_selector(uint16_t index, std::bitset<1U> table_indicator,
std::bitset<2U> requested_privilege_level)
@@ -20,14 +20,14 @@ namespace teachos::arch::memory::cpu
auto read_ss() -> uint16_t
{
uint16_t ss;
- __asm__("mov %%ss, %0" : "=r"(ss));
+ asm volatile("mov %%ss, %0" : "=r"(ss));
return ss;
}
auto write_ss(segment_selector selector) -> void
{
uint16_t ss = selector.to_uint16();
- __asm__("mov %0, %%ss" ::"r"(ss));
+ asm volatile("mov %0, %%ss" ::"r"(ss));
}
-} // namespace teachos::arch::memory::cpu \ No newline at end of file
+} // namespace teachos::arch::kernel::cpu \ No newline at end of file