blob: 28332193f2b93011d8d9aa722398957d49bb368f (
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 lcall *%[input]" : /* no output from call */ : [input] "m"(pointer));
}
} // namespace teachos::arch::kernel::cpu
|