mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-05 20:39:19 +00:00
Fix: x32 kernel failed to build
This commit is contained in:
@ -19,36 +19,28 @@ namespace FXSR
|
|||||||
{
|
{
|
||||||
void _fxsave(void *mem_addr)
|
void _fxsave(void *mem_addr)
|
||||||
{
|
{
|
||||||
#ifdef a64
|
|
||||||
__builtin_ia32_fxsave(mem_addr);
|
__builtin_ia32_fxsave(mem_addr);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _fxrstor(void *mem_addr)
|
void _fxrstor(void *mem_addr)
|
||||||
{
|
{
|
||||||
#ifdef a64
|
|
||||||
__builtin_ia32_fxrstor(mem_addr);
|
__builtin_ia32_fxrstor(mem_addr);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _fxsave64(void *mem_addr)
|
void _fxsave64(void *mem_addr)
|
||||||
{
|
{
|
||||||
#ifdef a64
|
|
||||||
asmv("fxsaveq (%0)"
|
asmv("fxsaveq (%0)"
|
||||||
:
|
:
|
||||||
: "r"(mem_addr)
|
: "r"(mem_addr)
|
||||||
: "memory");
|
: "memory");
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _fxrstor64(void *mem_addr)
|
void _fxrstor64(void *mem_addr)
|
||||||
{
|
{
|
||||||
#ifdef a64
|
|
||||||
asmv("fxrstorq (%0)"
|
asmv("fxrstorq (%0)"
|
||||||
:
|
:
|
||||||
: "r"(mem_addr)
|
: "r"(mem_addr)
|
||||||
: "memory");
|
: "memory");
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user