mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 00:37:23 +01:00
Common (Windows): works around a compiler optimise bug
This commit is contained in:
@@ -602,7 +602,15 @@ typedef struct _KUSER_SHARED_DATA {
|
||||
// ... more fields follow, but we don't need them
|
||||
} KUSER_SHARED_DATA, *PKUSER_SHARED_DATA;
|
||||
|
||||
#define SharedUserData ((const KUSER_SHARED_DATA*) 0x7FFE0000UL)
|
||||
#ifdef __aarch64__
|
||||
#define SharedUserData ({ \
|
||||
__auto_type shared_user_data = (const volatile KUSER_SHARED_DATA*) (uintptr_t) 0x7FFE0000UL; \
|
||||
__asm__("" : "+r"(shared_user_data)); /* https://github.com/lhmouse/mcfgthread/issues/330 */ \
|
||||
shared_user_data; \
|
||||
})
|
||||
#else
|
||||
#define SharedUserData ((const volatile KUSER_SHARED_DATA*) (uintptr_t) 0x7FFE0000UL)
|
||||
#endif
|
||||
|
||||
static inline uint64_t ffKSystemTimeToUInt64(const volatile KSYSTEM_TIME* pTime) {
|
||||
#if _WIN64
|
||||
|
||||
Reference in New Issue
Block a user