(for instance, when passing -msoft-float to the compiler)
The instructions used by jsimd_quantize_float_dspr2() and
jsimd_convsamp_float_dspr2() don't work with the soft float ABI, so
disable those functions when soft float is enabled.
Based on:
https://github.com/libjpeg-turbo/libjpeg-turbo/pull/272/commits/
129a739bfabe1568d078eb2719691a76db128185
Closes #272
projects that used `AC_CHECK_HEADERS()` to check for the existence of locale.h,
stddef.h, or stdlib.h.
+2. The `jsimd_quantize_float_dspr2()` and `jsimd_convsamp_float_dspr2()`
+functions in the MIPS DSPr2 SIMD extensions are now disabled at compile time
+if the soft float ABI is enabled. Those functions use instructions that are
+incompatible with the soft float ABI.
+
2.0.0
=====
if (sizeof(ISLOW_MULT_TYPE) != 2)
return 0;
+#ifndef __mips_soft_float
if (simd_support & JSIMD_DSPR2)
return 1;
+#endif
return 0;
}
jsimd_convsamp_float(JSAMPARRAY sample_data, JDIMENSION start_col,
FAST_FLOAT *workspace)
{
+#ifndef __mips_soft_float
jsimd_convsamp_float_dspr2(sample_data, start_col, workspace);
+#endif
}
GLOBAL(int)
if (sizeof(ISLOW_MULT_TYPE) != 2)
return 0;
+#ifndef __mips_soft_float
if (simd_support & JSIMD_DSPR2)
return 1;
+#endif
return 0;
}
jsimd_quantize_float(JCOEFPTR coef_block, FAST_FLOAT *divisors,
FAST_FLOAT *workspace)
{
+#ifndef __mips_soft_float
jsimd_quantize_float_dspr2(coef_block, divisors, workspace);
+#endif
}
GLOBAL(int)
END(jsimd_quantize_dspr2)
+#ifndef __mips_soft_float
+
/*****************************************************************************/
LEAF_DSPR2(jsimd_quantize_float_dspr2)
/*
END(jsimd_quantize_float_dspr2)
+#endif
+
/*****************************************************************************/
LEAF_DSPR2(jsimd_idct_2x2_dspr2)
END(jsimd_convsamp_dspr2)
+#ifndef __mips_soft_float
+
/*****************************************************************************/
LEAF_DSPR2(jsimd_convsamp_float_dspr2)
/*
END(jsimd_convsamp_float_dspr2)
+#endif
+
/*****************************************************************************/