[Pixman] [PATCH 03/13] MIPS: dspr2: Removed build restrictions and repair compiler's check

Nemanja Lukic nemanja.lukic at rt-rk.com
Fri Jun 27 09:05:40 PDT 2014

Build restriction wasn't good since it demands '-mips32r2'
in CFLAGS during configuration to enable DSPr2 optimizations.
Additional CFLAGS are not needed now and pixman could build
targeting the lowest common denominator.
Architecture and ISA are set in inline assembler
to allow compiler to build test code.
 configure.ac |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0339494..7d62373 100644
--- a/configure.ac
+++ b/configure.ac
@@ -720,25 +720,21 @@ dnl Check if assembler is gas compatible and supports MIPS DSPr2 instructions
 AC_MSG_CHECKING(whether to use MIPS DSPr2 assembler)
-CFLAGS="-mdspr2 $CFLAGS"
-#if !(defined(__mips__) &&  __mips_isa_rev >= 2)
-#error MIPS DSPr2 is currently only available on MIPS32r2 platforms.
 main ()
     int c = 0, a = 0, b = 0;
     __asm__ __volatile__ (
+        ".set        arch=mips32r2             \n\t"
+        ".set        dspr2                     \n\t"
         "precr.qb.ph %[c], %[a], %[b]          \n\t"
         : [c] "=r" (c)
         : [a] "r" (a), [b] "r" (b)
     return c;
 }]])], have_mips_dspr2=yes)

More information about the Pixman mailing list