From e0102ba38b420484bc564e5f94c60a0e306684d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Wed, 23 Mar 2022 13:14:40 +0100 Subject: [PATCH] boot/x86: if __uint128 is available, use it Change-Id: I2b01b8e205ffcfb9f3901715a7c8382a21d4f575 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5140 Reviewed-by: Adrien Destugues --- src/system/boot/arch/x86/arch_cpu.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/system/boot/arch/x86/arch_cpu.cpp b/src/system/boot/arch/x86/arch_cpu.cpp index fad2cd98dc..9c0a7ddd57 100644 --- a/src/system/boot/arch/x86/arch_cpu.cpp +++ b/src/system/boot/arch/x86/arch_cpu.cpp @@ -79,6 +79,9 @@ uint32 gTimeConversionFactor; // if the TSC just isn't stable and we can't get our desired error range. +#ifdef __SIZEOF_INT128__ +typedef unsigned __int128 uint128; +#else struct uint128 { uint128(uint64 low, uint64 high = 0) : @@ -178,6 +181,7 @@ private: uint64 low; uint64 high; }; +#endif static inline void