Skip to content
Snippets Groups Projects
Commit 148dea01 authored by Avi Kivity's avatar Avi Kivity
Browse files

x64: add LTR and STR accessors

parent 2f7e8602
No related branches found
No related tags found
No related merge requests found
......@@ -77,6 +77,16 @@ namespace processor {
asm volatile ("sidt %0" : "=m"(ptr));
}
inline void ltr(u16 tr) {
asm volatile("ltr %0" : : "rm"(tr));
}
inline u16 str() {
u16 tr;
asm volatile("str %0" : "=rm"(tr));
return tr;
}
inline u16 read_cs() {
u16 r;
asm volatile ("mov %%cs, %0" : "=rm"(r));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment