Title: [217105] trunk
Revision
217105
Author
commit-qu...@webkit.org
Date
2017-05-19 01:58:30 -0700 (Fri, 19 May 2017)

Log Message

[CMake] Add HAVE check for __int128_t
https://bugs.webkit.org/show_bug.cgi?id=172317

Patch by Don Olmstead <don.olmst...@am.sony.com> on 2017-05-19
Reviewed by Yusuke Suzuki.

.:

* Source/cmake/OptionsCommon.cmake:

Source/WTF:

* wtf/MediaTime.cpp:
(WTF::MediaTime::setTimeScale):
* wtf/Platform.h:

Modified Paths

Diff

Modified: trunk/ChangeLog (217104 => 217105)


--- trunk/ChangeLog	2017-05-19 08:27:18 UTC (rev 217104)
+++ trunk/ChangeLog	2017-05-19 08:58:30 UTC (rev 217105)
@@ -1,3 +1,12 @@
+2017-05-19  Don Olmstead  <don.olmst...@am.sony.com>
+
+        [CMake] Add HAVE check for __int128_t
+        https://bugs.webkit.org/show_bug.cgi?id=172317
+
+        Reviewed by Yusuke Suzuki.
+
+        * Source/cmake/OptionsCommon.cmake:
+
 2017-05-16  Zan Dobersek  <zdober...@igalia.com>
 
         [WPE] Set and expose ENABLE_DEVELOPER_MODE in build when DEVELOPER_MODE is enabled

Modified: trunk/Source/WTF/ChangeLog (217104 => 217105)


--- trunk/Source/WTF/ChangeLog	2017-05-19 08:27:18 UTC (rev 217104)
+++ trunk/Source/WTF/ChangeLog	2017-05-19 08:58:30 UTC (rev 217105)
@@ -1,3 +1,14 @@
+2017-05-19  Don Olmstead  <don.olmst...@am.sony.com>
+
+        [CMake] Add HAVE check for __int128_t
+        https://bugs.webkit.org/show_bug.cgi?id=172317
+
+        Reviewed by Yusuke Suzuki.
+
+        * wtf/MediaTime.cpp:
+        (WTF::MediaTime::setTimeScale):
+        * wtf/Platform.h:
+
 2017-05-18  Andreas Kling  <akl...@apple.com>
 
         [WK2] Notify WebPageProxy client when an active process goes over the inactive memory limit

Modified: trunk/Source/WTF/wtf/MediaTime.cpp (217104 => 217105)


--- trunk/Source/WTF/wtf/MediaTime.cpp	2017-05-19 08:27:18 UTC (rev 217104)
+++ trunk/Source/WTF/wtf/MediaTime.cpp	2017-05-19 08:58:30 UTC (rev 217105)
@@ -489,7 +489,7 @@
 
     timeScale = std::min(MaximumTimeScale, timeScale);
 
-#if !PLATFORM(WIN) && (CPU(X86_64) || CPU(ARM64))
+#if HAVE(INT128_T)
     __int128_t newValue = static_cast<__int128_t>(m_timeValue) * timeScale;
     int64_t remainder = newValue % m_timeScale;
     newValue = newValue / m_timeScale;

Modified: trunk/Source/WTF/wtf/Platform.h (217104 => 217105)


--- trunk/Source/WTF/wtf/Platform.h	2017-05-19 08:27:18 UTC (rev 217104)
+++ trunk/Source/WTF/wtf/Platform.h	2017-05-19 08:58:30 UTC (rev 217105)
@@ -648,6 +648,10 @@
 #define HAVE_TM_GMTOFF 1
 #define HAVE_TM_ZONE 1
 #define HAVE_TIMEGM 1
+
+#if CPU(X86_64) || CPU(ARM64)
+#define HAVE_INT128_T 1
+#endif
 #endif /* OS(DARWIN) */
 
 #if OS(UNIX)

Modified: trunk/Source/cmake/OptionsCommon.cmake (217104 => 217105)


--- trunk/Source/cmake/OptionsCommon.cmake	2017-05-19 08:27:18 UTC (rev 217104)
+++ trunk/Source/cmake/OptionsCommon.cmake	2017-05-19 08:58:30 UTC (rev 217105)
@@ -228,6 +228,7 @@
 include(CheckFunctionExists)
 include(CheckSymbolExists)
 include(CheckStructHasMember)
+include(CheckTypeSize)
 
 macro(_HAVE_CHECK_INCLUDE _variable _header)
     check_include_file(${_header} ${_variable}_value)
@@ -280,3 +281,10 @@
 _HAVE_CHECK_STRUCT(HAVE_STAT_BIRTHTIME "struct stat" st_birthtime sys/stat.h)
 _HAVE_CHECK_STRUCT(HAVE_TM_GMTOFF "struct tm" tm_gmtoff time.h)
 _HAVE_CHECK_STRUCT(HAVE_TM_ZONE "struct tm" tm_zone time.h)
+
+# Check for int types
+check_type_size("__int128_t" INT128_VALUE)
+
+if (HAVE_INT128_VALUE)
+  SET_AND_EXPOSE_TO_BUILD(HAVE_INT128_T INT128_VALUE)
+endif ()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to