Bug 1562886 - Avoid noinline on GCC with skcms to work around compiler error. r=me
authorLee Salzman <lsalzman@mozilla.com>
Wed, 03 Jul 2019 15:52:39 -0400
changeset 544130 4f7ddb86b9897738a34ab05c81864fcb154411c5
parent 544129 3e0058a9e0854e3f54cf5f631a15b6b714b61bc7
child 544131 c6f9de5818eee7efec58529b42a15f0bb024714d
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1562886
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1562886 - Avoid noinline on GCC with skcms to work around compiler error. r=me
gfx/skia/skia/third_party/skcms/src/Transform_inl.h
--- a/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
+++ b/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
@@ -554,17 +554,18 @@ SI void sample_clut_16(const skcms_A2B* 
     *r = cast<F>((rgb >>  0) & 0xffff) * (1/65535.0f);
     *g = cast<F>((rgb >> 16) & 0xffff) * (1/65535.0f);
     *b = cast<F>((rgb >> 32) & 0xffff) * (1/65535.0f);
 #endif
 }
 
 // GCC 7.2.0 hits an internal compiler error with -finline-functions (or -O3)
 // when targeting MIPS 64,  I think attempting to inline clut() into exec_ops().
-#if 1 && defined(__GNUC__) && !defined(__clang__) && defined(__mips64)
+// s390x and i*86 also hit this with GCC 7.4 and -O2
+#if 1 && defined(__GNUC__) && !defined(__clang__) && (defined(__mips64) || defined(__s390x__) || defined(__i586__) || defined(__i486__) || defined(__i386__))
     #define MAYBE_NOINLINE __attribute__((noinline))
 #else
     #define MAYBE_NOINLINE
 #endif
 
 MAYBE_NOINLINE
 static void clut(const skcms_A2B* a2b, F* r, F* g, F* b, F a) {
     const int dim = (int)a2b->input_channels;