Backed out bug 1422368 fixes because they weren't sufficient.
authorDavid Major <dmajor@mozilla.com>
Mon, 02 Apr 2018 17:20:35 -0400
changeset 776408 737b602f4c6f864b34080d0fe57c2ff75de3b909
parent 776407 a6a99136300c0453b38388f8ce669a6505d9ae62
child 776409 5559c98dc19a1713cd9279c0a2a833c6b62e08e8
push id104871
push userbmo:dakatsuka@mozilla.com
push dateTue, 03 Apr 2018 01:24:29 +0000
bugs1422368
milestone61.0a1
Backed out bug 1422368 fixes because they weren't sufficient.
gfx/ycbcr/README
gfx/ycbcr/clang-cl-workaround.patch
gfx/ycbcr/update.sh
gfx/ycbcr/yuv_row_win.cpp
--- a/gfx/ycbcr/README
+++ b/gfx/ycbcr/README
@@ -22,10 +22,8 @@ convert.patch contains the following cha
   * Bug 616778 - Split yuv_convert FilterRows vectorized code into separate files so it can
     be properly guarded with cpuid() calls.
 
 win64.patch: SSE2 optimization for Microsoft Visual C++ x64 version
 
 TypeFromSize.patch: Bug 656185 - Add a method to detect YUVType from plane sizes.
 
 QuellGccWarnings.patch: Bug 711895 - Avoid some GCC compilation warnings.
-
-clang-cl-workaround.patch: Bug 1422368 - Work around a clang-cl unresolved symbol bug.
deleted file mode 100644
--- a/gfx/ycbcr/clang-cl-workaround.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/gfx/ycbcr/yuv_row_win.cpp b/gfx/ycbcr/yuv_row_win.cpp
---- a/gfx/ycbcr/yuv_row_win.cpp
-+++ b/gfx/ycbcr/yuv_row_win.cpp
-@@ -7,19 +7,21 @@
- 
- #define kCoefficientsRgbU kCoefficientsRgbY + 2048
- #define kCoefficientsRgbV kCoefficientsRgbY + 4096
- 
- extern "C" {
- 
- #if defined(MOZILLA_MAY_SUPPORT_SSE) && defined(_M_IX86)
- #if defined(__clang__)
--// clang-cl may erroneously discard the symbol `kCoefficientsRgbY`
--// https://bugs.llvm.org/show_bug.cgi?id=35290
--volatile auto keep_kCoefficientsRgbY_alive = &kCoefficientsRgbY;
-+// clang-cl has a bug where it doesn't mangle names in inline asm
-+// so let's do the mangling in the preprocessor (ugh)
-+// (but we still need to declare a dummy extern for the parser)
-+extern void* _kCoefficientsRgbY;
-+#define kCoefficientsRgbY _kCoefficientsRgbY
- #endif
- 
- __declspec(naked)
- void FastConvertYUVToRGB32Row_SSE(const uint8* y_buf,
-                                   const uint8* u_buf,
-                                   const uint8* v_buf,
-                                   uint8* rgb_buf,
-                                   int width) {
--- a/gfx/ycbcr/update.sh
+++ b/gfx/ycbcr/update.sh
@@ -5,9 +5,8 @@ cp $1/media/base/yuv_row.h .
 cp $1/media/base/yuv_row_table.cc yuv_row_table.cpp
 cp $1/media/base/yuv_row_posix.cc yuv_row_posix.cpp
 cp $1/media/base/yuv_row_win.cc yuv_row_win.cpp
 cp $1/media/base/yuv_row_posix.cc yuv_row_c.cpp
 patch -p3 <convert.patch
 patch -p3 <win64.patch
 patch -p3 <TypeFromSize.patch
 patch -p3 <QuellGccWarnings.patch
-patch -p3 <clang-cl-workaround.patch
--- a/gfx/ycbcr/yuv_row_win.cpp
+++ b/gfx/ycbcr/yuv_row_win.cpp
@@ -6,24 +6,16 @@
 #include "mozilla/SSE.h"
 
 #define kCoefficientsRgbU kCoefficientsRgbY + 2048
 #define kCoefficientsRgbV kCoefficientsRgbY + 4096
 
 extern "C" {
 
 #if defined(MOZILLA_MAY_SUPPORT_SSE) && defined(_M_IX86)
-#if defined(__clang__)
-// clang-cl has a bug where it doesn't mangle names in inline asm
-// so let's do the mangling in the preprocessor (ugh)
-// (but we still need to declare a dummy extern for the parser)
-extern void* _kCoefficientsRgbY;
-#define kCoefficientsRgbY _kCoefficientsRgbY
-#endif
-
 __declspec(naked)
 void FastConvertYUVToRGB32Row_SSE(const uint8* y_buf,
                                   const uint8* u_buf,
                                   const uint8* v_buf,
                                   uint8* rgb_buf,
                                   int width) {
   __asm {
     pushad