blob: 0c946931dc14414de57be4e8a93500aefcc94e8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include "arch/kernel/cpu/jmp.hpp"
namespace teachos::arch::kernel::cpu
{
auto jmp(std::size_t address) -> void
{
asm volatile("jmp *%[input]" : /* no output from call */ : [input] "r"(address));
}
auto jmp(far_pointer pointer) -> void
{
asm volatile("rex64 ljmp *%[input]" : /* no output from call */ : [input] "m"(pointer));
}
} // namespace teachos::arch::kernel::cpu
|