[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
 
 have_mips_dspr2=no
 AC_MSG_CHECKING(whether to use MIPS DSPr2 assembler)
-xserver_save_CFLAGS=$CFLAGS
-CFLAGS="-mdspr2 $CFLAGS"
 
 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-#if !(defined(__mips__) &&  __mips_isa_rev >= 2)
-#error MIPS DSPr2 is currently only available on MIPS32r2 platforms.
-#endif
 int
 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)
-CFLAGS=$xserver_save_CFLAGS
 
 AC_ARG_ENABLE(mips-dspr2,
    [AC_HELP_STRING([--disable-mips-dspr2],
-- 
1.7.3



More information about the Pixman mailing list