Bug 1163740: Keep |result| in a register where we can see it in minidumps. r=seth
authorDavid Major <dmajor@mozilla.com>
Fri, 22 May 2015 16:49:37 -0400
changeset 245251 a620a422367fb9160a58d3f37cd669960334e632
parent 245250 d773854c6324d58d488b211060907fffe8f885b2
child 245252 7eb6bac89ff4300bc70f4f2526cbc4d917e9d85e
push id28799
push userphilringnalda@gmail.com
push dateSat, 23 May 2015 20:31:44 +0000
treeherdermozilla-central@c3c0928c3cde [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersseth
bugs1163740
milestone41.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 1163740: Keep |result| in a register where we can see it in minidumps. r=seth
gfx/qcms/transform-sse1.c
--- a/gfx/qcms/transform-sse1.c
+++ b/gfx/qcms/transform-sse1.c
@@ -85,27 +85,27 @@ void qcms_transform_data_rgb_out_lut_sse
 
         /* store calc'd output tables indices */
         /* Bug 1163740 temporary investigation:
          * Write output[0] last, to keep |result| in a register in minidumps */
         result_hi = _mm_movehl_ps(result, result);
         *((__m64 *)&output[2]) = _mm_cvtps_pi32(result_hi);
         *((__m64 *)&output[0]) = _mm_cvtps_pi32(result);
 
+        /* use calc'd indices to output RGB values */
+        dest[OUTPUT_R_INDEX] = otdata_r[output[0]];
+        dest[OUTPUT_G_INDEX] = otdata_g[output[1]];
+        dest[OUTPUT_B_INDEX] = otdata_b[output[2]];
+        dest += RGB_OUTPUT_COMPONENTS;
+
         /* load for next loop while store completes */
         vec_r = _mm_load_ss(&igtbl_r[src[0]]);
         vec_g = _mm_load_ss(&igtbl_g[src[1]]);
         vec_b = _mm_load_ss(&igtbl_b[src[2]]);
         src += 3;
-
-        /* use calc'd indices to output RGB values */
-        dest[OUTPUT_R_INDEX] = otdata_r[output[0]];
-        dest[OUTPUT_G_INDEX] = otdata_g[output[1]];
-        dest[OUTPUT_B_INDEX] = otdata_b[output[2]];
-        dest += RGB_OUTPUT_COMPONENTS;
     }
 
     /* handle final (maybe only) pixel */
 
     vec_r = _mm_shuffle_ps(vec_r, vec_r, 0);
     vec_g = _mm_shuffle_ps(vec_g, vec_g, 0);
     vec_b = _mm_shuffle_ps(vec_b, vec_b, 0);
 
@@ -209,27 +209,27 @@ void qcms_transform_data_rgba_out_lut_ss
         result = _mm_mul_ps(vec_r, scale);
 
         /* Bug 1163740 temporary investigation:
          * Write output[0] last, to keep |result| in a register in minidumps */
         result_hi = _mm_movehl_ps(result, result);
         *((__m64 *)&output[2]) = _mm_cvtps_pi32(result_hi);
         *((__m64 *)&output[0]) = _mm_cvtps_pi32(result);
 
+        /* use calc'd indices to output RGB values */
+        dest[OUTPUT_R_INDEX] = otdata_r[output[0]];
+        dest[OUTPUT_G_INDEX] = otdata_g[output[1]];
+        dest[OUTPUT_B_INDEX] = otdata_b[output[2]];
+        dest += 4;
+
         /* load gamma values for next loop while store completes */
         vec_r = _mm_load_ss(&igtbl_r[src[0]]);
         vec_g = _mm_load_ss(&igtbl_g[src[1]]);
         vec_b = _mm_load_ss(&igtbl_b[src[2]]);
         src += 4;
-
-        /* use calc'd indices to output RGB values */
-        dest[OUTPUT_R_INDEX] = otdata_r[output[0]];
-        dest[OUTPUT_G_INDEX] = otdata_g[output[1]];
-        dest[OUTPUT_B_INDEX] = otdata_b[output[2]];
-        dest += 4;
     }
 
     /* handle final (maybe only) pixel */
 
     vec_r = _mm_shuffle_ps(vec_r, vec_r, 0);
     vec_g = _mm_shuffle_ps(vec_g, vec_g, 0);
     vec_b = _mm_shuffle_ps(vec_b, vec_b, 0);