On Wed, Mar 10, 2010, Siarhei Siamashka wrote: > I would prefer a bit more descriptive comment (with the details copied > from that launchpad page).
I see you pushed this now; thanks! Yeah, it's not obvious why one needs to try with the toolchain defaults first. I'm attaching a patch to update the comments. > Patch looks mostly OK to me and improves arm simd support a bit. It still > fails with CFLAGS="-O2 -mthumb" (and toolchain configured to compile for armv4 > by default) This is unfortunate, but even if I could change the configure test to succeed here, the actual build would place CFLAGS last (user-overrides); it's perhaps best if the build fails at this point. The other option would be to munge the user-specific CFLAGS in configure, but I'm not sure I'm confortable with that, plus these can be overriden during the build as well. So I guess people forcing Thumb in CFLAGS with a default of an old CPU will have a bit more pain here. I think it also fails if you force -mcpu=oldcpu in CFLAGS. > But that was also happening earlier, so it is not a regression. Ack > In my opinion the best solution overall would be to move all the assembly > optimizations into separate .S files also for legacy ARM processors and > get rid of these compiler option hacks. I think that bringing support for > legacy ARM processors into a better shape is quite realistic even for 0.18.0 > stable release, which is due to be released this month. But it can only happen > if enough people are interested in this, and more importantly, are ready to > actively participate in testing. I think this should be kept as an open bug against pixman that the inline asm()s would better be written as separate .S files (thanks for the idea). -- Loïc Minier
>From 167e2ecf0798587be6bccd50fbfb5d0d561e11ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Minier?= <[email protected]> Date: Sun, 14 Mar 2010 18:13:27 +0100 Subject: [PATCH] ARM: More verbose comments for -mcpu= SIMD CFLAGS --- configure.ac | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index fed97b1..a06f276 100644 --- a/configure.ac +++ b/configure.ac @@ -367,15 +367,19 @@ ARM_SIMD_CFLAGS="" have_arm_simd=no AC_MSG_CHECKING(whether to use ARM SIMD assembler) -# check with default CFLAGS in case the toolchain turns on a sufficiently recent -mcpu= +# the first -mcpu= to support uqadd8 is arm1136j-s but in ARM mode (not in +# Thumb mode; it was added with later CPUs in Thumb-2 mode); however the +# toolchain might be configured for a more recent -march=/-mcpu=, so we first +# try without any specific CFLAGS (i.e. using the toolchain defaults); only if +# that doesn't work do we pass -mcpu=arm1136j-s -marm AC_COMPILE_IFELSE([ int main () { asm("uqadd8 r1, r1, r2"); return 0; }], have_arm_simd=yes, - # check again with an explicit -mcpu= in case the toolchain defaults to an - # older one; note that uqadd8 isn't available in Thumb mode on arm1136j-s - # so we force ARM mode + # check again with an explicit -mcpu= and in ARM mode in case the toolchain + # defaults to an older one, or to Thumb mode (uqadd8 isn't available in + # Thumb mode on arm1136j-s) ARM_SIMD_CFLAGS="-mcpu=arm1136j-s -marm" xserver_save_CFLAGS=$CFLAGS CFLAGS="$ARM_SIMD_CFLAGS $CFLAGS" -- 1.7.0
_______________________________________________ Pixman mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pixman
