Fix FAT driver issues (FAT32 while being under 32MiB), liballoc alignment so SSE doesnt break
This commit is contained in:
@@ -3,17 +3,22 @@
|
||||
|
||||
#define fx_save(buf) \
|
||||
do { \
|
||||
__asm__ volatile ("fxsave64 (%0)" ::"r"((buf)) : "memory"); \
|
||||
__asm__ volatile ("fxsave64 %0" : "=m"(*(buf))::"memory"); \
|
||||
} while (0)
|
||||
|
||||
#define fx_restore(buf) \
|
||||
do { \
|
||||
__asm__ volatile ("fxrstor64 (%0)" ::"r"((buf)) : "memory"); \
|
||||
__asm__ volatile ("fxrstor64 %0" ::"m"(*(buf)) : "memory"); \
|
||||
} while (0)
|
||||
|
||||
#define fx_init(buf) \
|
||||
do { \
|
||||
__asm__ volatile ("fninit; fxsave64 (%0)" ::"r"((buf)) : "memory"); \
|
||||
memset ((buf), 0, sizeof ((buf))); \
|
||||
__asm__ volatile ("fninit; fxsave64 %0" : "=m"(*(buf))::"memory"); \
|
||||
uint32_t* __mxcsr = (uint32_t*)&(buf)[24]; \
|
||||
*__mxcsr = 0x1F80; \
|
||||
uint16_t* __fcw = (uint16_t*)&(buf)[0]; \
|
||||
*__fcw = 0x037F; \
|
||||
} while (0)
|
||||
|
||||
#endif // _KERNEL_AMD64_FX_H
|
||||
|
||||
Reference in New Issue
Block a user