diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index b3a4c5f..66a8fc0 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -253,6 +253,17 @@ static const mmx_data_t c =
 #    define MC(x) c.mmx_ ## x
 #endif
 
+#pragma optimize ("", off)
+
+static void _my_mm_empty(void)
+{
+  _mm_empty();
+}
+
+#define _mm_empty() _my_mm_empty()
+
+#pragma optimize ("", on)
+
 static force_inline __m64
 to_m64 (uint64_t x)
 {
