Bug 1562886 - Avoid noinline on GCC with skcms to work around compiler error. r=me, a=RyanVM FENNEC_68_1b1_BUILD1
authorLee Salzman <lsalzman@mozilla.com>
Wed, 03 Jul 2019 15:52:39 -0400
changeset 522835 420c07d42512ed9fd73d694d800752777650e78e
parent 522834 161aae250e42256d501e99f946e98d066dfb147f
child 522836 59a3b58682a8a2de6bb29834d583d6e59bdf70f1
push id53
push userryanvm@gmail.com
push dateMon, 08 Jul 2019 20:22:09 +0000
treeherdermozilla-esr68@420c07d42512 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme, RyanVM
bugs1562886
milestone68.1.0
Bug 1562886 - Avoid noinline on GCC with skcms to work around compiler error. r=me, a=RyanVM
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;