Speculative build fix after r226600. We only use clflush on x86 and the `asm volatile...
authorsbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jan 2018 01:55:40 +0000 (01:55 +0000)
committersbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jan 2018 01:55:40 +0000 (01:55 +0000)
No new tests because this is a build fix.

* dom/Comment.cpp:
(WebCore::Comment::clflushReadLength):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226603 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/dom/Comment.cpp

index 3749d85..312baa8 100644 (file)
@@ -1,3 +1,12 @@
+2018-01-08  Saam Barati  <sbarati@apple.com>
+
+        Speculative build fix after r226600. We only use clflush on x86 and the `asm volatile` syntax is not available in the Windows build.
+
+        No new tests because this is a build fix.
+
+        * dom/Comment.cpp:
+        (WebCore::Comment::clflushReadLength):
+
 2018-01-08  Michael Saboff  <msaboff@apple.com>
 
         Add a DOM gadget for Spectre testing
index 86e8e46..1bda78a 100644 (file)
@@ -86,12 +86,14 @@ unsigned Comment::charCodeAt(unsigned index)
 
 void Comment::clflushReadLength()
 {
+#if CPU(X86_64) && !OS(WINDOWS)
     auto clflush = [] (void* ptr) {
         char* ptrToFlush = static_cast<char*>(ptr);
         asm volatile ("clflush %0" :: "m"(*ptrToFlush) : "memory");
     };
 
     clflush(&m_readLength);
+#endif
 }
 
 } // namespace WebCore