[Vm-dev] [commit][3112] Finish integrating Doug McPherson' s changes for building the Stack VM on ARM:

commits at squeakvm.org commits at squeakvm.org
Sat Oct 25 04:39:09 UTC 2014


Revision: 3112
Author:   eliot
Date:     2014-10-24 21:39:07 -0700 (Fri, 24 Oct 2014)
Log Message:
-----------
Finish integrating Doug McPherson's changes for building the Stack VM on ARM:

Support building for ARM architecture 7-A (Cortex-A8, Cortex-A9, etc. see http://en.wikipedia.org/wiki/ARM_architecture) such as is used in BeagleBone Black, Parallella, countless smartphones, Chromebooks, etc, etc.

Cog/platforms/Cross/vm/
1. replace sqAtomicOps.h
2. replace sqMemoryFence.h

Cog/platforms/unix/vm/
1. replace sqUnixHeartbeat.c
2. replace sqUnixITimerHeartbeat.c
3. replace sqUnixITimerTickerHeartbeat.c

Cog/
1. rename build.linux32ARMv6 to build.linux32ARM 




Clean up building of BitBltPlugin and vm-display-X11 to compile/assemble only the required files based on 1) host_cpu=arm and 2) the presence of --enable-fast-bitblt option to unix/config/configure (for example in mvm scripts)

Cog/platforms/unix/config/
1. replace make.cfg.in
2. replace configure

Cog/platforms/unix/plugins/BitBltPlugin/
1. ******DELETE Makefile.in *******
2. replace acinclude.m4
3. replace Makefile.inc

Cog/platforms/Cross/plugins/BitBltPlugin/
- remove the conditional compile #if defined(ENABLE_FAST_BLT) which completely surrounds the content of each of these files. Each of these is now built or not built based on autoconf magic.
1. replace BitBltArm.c
2. replace BitBltArmLinux.c
3. replace BitBltArmOther.c
4. replace BitBltArmSimd.c
5. replace BitBltDispatch.c
6. replace BitBltGeneric.c

Cog/platforms/unix/vm-display-X11/
- rename USE_FAST_BLT to ENABLE_FAST_BLT for consistency with BitBltPlugin
1. replace sqUnixX11.c
2. replace acinclude.m4
3. replace Makefile.inc

Cog/build.linux32ARM/squeak.stack.v3/build/
1. replace mvm
2. add SqueakSSL to plugins.ext
3. should do same edits for build.debug/ and build.assert/ (and add SqueakFFIPrims and SqueakSSL)

Cog/platforms/unix/vm-display-null/
- Clean up harmless but annoying redundant compile flags in vm-display-null
1. replace Makefile.inc

Modified Paths:
--------------
    branches/Cog/build.linux32ARM/squeak.stack.v3/build/mvm
    branches/Cog/build.linux32ARM/squeak.stack.v3/build.assert/mvm
    branches/Cog/build.linux32ARM/squeak.stack.v3/build.debug/mvm
    branches/Cog/platforms/unix/config/configure
    branches/Cog/platforms/unix/config/make.cfg.in
    branches/Cog/platforms/unix/plugins/BitBltPlugin/Makefile.inc
    branches/Cog/platforms/unix/plugins/BitBltPlugin/acinclude.m4
    branches/Cog/platforms/unix/vm-display-X11/Makefile.in
    branches/Cog/platforms/unix/vm-display-X11/acinclude.m4
    branches/Cog/platforms/unix/vm-display-X11/sqUnixX11.c
    branches/Cog/platforms/unix/vm-display-null/Makefile.inc

Added Paths:
-----------
    branches/Cog/build.linux32ARM/

Removed Paths:
-------------
    branches/Cog/build.linux32ARMv6/

Property Changed:
----------------
    branches/Cog/platforms/Cross/vm/sqSCCSVersion.h

Modified: branches/Cog/build.linux32ARM/squeak.stack.v3/build/mvm
===================================================================
--- branches/Cog/build.linux32ARMv6/squeak.stack.v3/build/mvm	2014-10-09 20:54:06 UTC (rev 3100)
+++ branches/Cog/build.linux32ARM/squeak.stack.v3/build/mvm	2014-10-25 04:39:07 UTC (rev 3112)
@@ -19,10 +19,10 @@
 esac
 test -f config.h || ../../../platforms/unix/config/configure \
 	--with-src=stacksrc --with-plugins=src/plugins --disable-cogit \
-	--without-vm-display-fbdev --without-npsqueak \
+	--without-vm-display-fbdev --without-npsqueak --enable-fast-bitblt \
 	CC="gcc " \
 	CXX="g++ " \
-	CFLAGS="$OPT  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64  -DENABLE_FAST_BLT -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS" \
+	CFLAGS="$OPT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DENABLE_FAST_BLT -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS" \
 	LIBS="-lpthread -luuid" \
 	LDFLAGS=-Wl,-z,now
 rm -f vm/sqUnixMain.o # nuke version info

Modified: branches/Cog/build.linux32ARM/squeak.stack.v3/build.assert/mvm
===================================================================
--- branches/Cog/build.linux32ARMv6/squeak.stack.v3/build.assert/mvm	2014-10-09 20:54:06 UTC (rev 3100)
+++ branches/Cog/build.linux32ARM/squeak.stack.v3/build.assert/mvm	2014-10-25 04:39:07 UTC (rev 3112)
@@ -15,7 +15,7 @@
 esac
 test -f config.h || ../../../platforms/unix/config/configure \
 	--with-src=stacksrc --with-plugins=src/plugins --disable-cogit \
-	--without-vm-display-fbdev --without-npsqueak \
+	--without-vm-display-fbdev --without-npsqueak --enable-fast-bitblt \
 	CC="gcc " \
 	CXX="g++ " \
 	CFLAGS="$OPT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DENABLE_FAST_BLT -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS" \

Modified: branches/Cog/build.linux32ARM/squeak.stack.v3/build.debug/mvm
===================================================================
--- branches/Cog/build.linux32ARMv6/squeak.stack.v3/build.debug/mvm	2014-10-09 20:54:06 UTC (rev 3100)
+++ branches/Cog/build.linux32ARM/squeak.stack.v3/build.debug/mvm	2014-10-25 04:39:07 UTC (rev 3112)
@@ -15,10 +15,10 @@
 esac
 test -f config.h || ../../../platforms/unix/config/configure \
 	--with-src=stacksrc --with-plugins=src/plugins --disable-cogit \
-	--without-vm-display-fbdev --without-npsqueak\
+	--without-vm-display-fbdev --without-npsqueak --enable-fast-bitblt \
 	CC="gcc " \
 	CXX="g++ " \
-	CFLAGS="$OPT  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DENABLE_FAST_BLT -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS" \
+	CFLAGS="$OPT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DENABLE_FAST_BLT -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS" \
 	LIBS="-lpthread -luuid" \
 	LDFLAGS=-Wl,-z,now
 rm -f vm/sqUnixMain.o # nuke version info


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Fri Oct 24 15:52:20 PDT 2014
   + Fri Oct 24 21:38:31 PDT 2014

Modified: branches/Cog/platforms/unix/config/configure
===================================================================
--- branches/Cog/platforms/unix/config/configure	2014-10-24 22:52:56 UTC (rev 3111)
+++ branches/Cog/platforms/unix/config/configure	2014-10-25 04:39:07 UTC (rev 3112)
@@ -463,7 +463,7 @@
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='NM LD SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS cogit topdir cfgdir vmmdir vmpdir vmmcfg blddir SQ_MAJOR SQ_MINOR SQ_UPDATE SQ_VERSION VM_MAJOR VM_MINOR VM_RELEASE VM_VERSION imgdir expanded_relative_imgdir plgdir build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT WFLAGS AS RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN CPP EGREP SED LN_S ECHO AR ac_ct_AR STRIP ac_ct_STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL INCLUDES HAVE_INTERP_H ALLOCA INTERP AWK VM_APP_ICONS npsqueak install_nps uninstall_nps SQ_LIBDIR int_modules ext_modules HAVE_LANGINFO_CODESET HAVE_NANOSLEEP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS X_CPPFLAGS X_INCLUDES BITBLT_OBJS LIBM_CFLAGS IA32ABI_OBJS LIB_UUID int_plugins ext_plugins LIBOBJS LTLIBOBJS'
+ac_subst_vars='NM LD SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS cogit topdir cfgdir vmmdir vmpdir vmmcfg blddir SQ_MAJOR SQ_MINOR SQ_UPDATE SQ_VERSION VM_MAJOR VM_MINOR VM_RELEASE VM_VERSION imgdir expanded_relative_imgdir plgdir build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT WFLAGS AS RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN CPP EGREP SED LN_S ECHO AR ac_ct_AR STRIP ac_ct_STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL INCLUDES HAVE_INTERP_H ALLOCA INTERP AWK VM_APP_ICONS npsqueak install_nps uninstall_nps SQ_LIBDIR int_modules ext_modules HAVE_LANGINFO_CODESET HAVE_NANOSLEEP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS X_CPPFLAGS X_INCLUDES VM_DISPX11_OBJS VM_DISPX11_BITBLT_FLAGS BITBLT_OBJS BITBLT_FLAGS ARM_ARCH LIBM_CFLAGS IA32ABI_OBJS LIB_UUID int_plugins ext_plugins LIBOBJS LTLIBOBJS'
 ac_subst_files='make_cfg make_int make_ext make_prg Makefile_install Makefile_dist Makefile_rpm Makefile_deb'
 
 # Initialize some variables set by options.
@@ -1031,6 +1031,7 @@
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
   --disable-iconv         disable iconv support default=enabled
+  --enable-fast-bitblt enable fast BitBlt optimizations (default=no)
   --enable-mpg-mmx        enable MMX support in Mpeg3Plugin default=no
   --enable-mpg-pthreads   enable pthread support in Mpeg3Plugin default=no
 
@@ -5922,7 +5923,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5925 "configure"' > conftest.$ac_ext
+  echo '#line 5926 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -6939,7 +6940,7 @@
 
 
 # Provide some information about the compiler.
-echo "$as_me:6942:" \
+echo "$as_me:6943:" \
      "checking for Fortran 77 compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -8002,11 +8003,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8005: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8006: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8009: \$? = $ac_status" >&5
+   echo "$as_me:8010: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8270,11 +8271,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8273: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8274: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8277: \$? = $ac_status" >&5
+   echo "$as_me:8278: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8374,11 +8375,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8377: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8378: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8381: \$? = $ac_status" >&5
+   echo "$as_me:8382: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9843,7 +9844,7 @@
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 9846 "configure"' > conftest.$ac_ext
+    echo '#line 9847 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -10740,7 +10741,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10743 "configure"
+#line 10744 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10840,7 +10841,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10843 "configure"
+#line 10844 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13183,11 +13184,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13186: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13187: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:13190: \$? = $ac_status" >&5
+   echo "$as_me:13191: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -13287,11 +13288,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13290: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13291: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13294: \$? = $ac_status" >&5
+   echo "$as_me:13295: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -13823,7 +13824,7 @@
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 13826 "configure"' > conftest.$ac_ext
+    echo '#line 13827 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -14881,11 +14882,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14884: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14885: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14888: \$? = $ac_status" >&5
+   echo "$as_me:14889: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -14985,11 +14986,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14988: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14989: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14992: \$? = $ac_status" >&5
+   echo "$as_me:14993: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -16434,7 +16435,7 @@
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 16437 "configure"' > conftest.$ac_ext
+    echo '#line 16438 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -17212,11 +17213,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17215: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17216: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17219: \$? = $ac_status" >&5
+   echo "$as_me:17220: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17480,11 +17481,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17483: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17484: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17487: \$? = $ac_status" >&5
+   echo "$as_me:17488: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17584,11 +17585,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17587: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17588: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:17591: \$? = $ac_status" >&5
+   echo "$as_me:17592: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -19053,7 +19054,7 @@
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 19056 "configure"' > conftest.$ac_ext
+    echo '#line 19057 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -25294,6 +25295,24 @@
   have_gl="yes"
 fi;
 
+vm_dispx11_objs="sqUnixX11.lo sqUnixMozilla.lo"
+vm_dispx11_bitblt_flags=""
+
+case $host_cpu in
+arm*)
+# Check whether --enable-fast-bitblt or --disable-fast-bitblt was given.
+if test "${enable_fast_bitblt+set}" = set; then
+  enableval="$enable_fast_bitblt"
+   if   test "x$enableval" = "xyes" ; then
+      vm_dispx11_objs="sqUnixX11.lo sqUnixMozilla.lo sqUnixX11Arm.lo"
+      vm_dispx11_bitblt_flags="-DENABLE_FAST_BLT"
+   fi
+
+fi;
+;;
+esac
+
+
 ###xxx FIXME (AGAIN): mandrake needs explicit -lpthread
 
 VMLIBS=${LIBS}
@@ -27118,6 +27137,11 @@
 CFLAGS=${VMCFLAGS}
 CPPFLAGS=${VMCPPFLAGS}
 INCLUDES=${VMINCLUDES}
+
+VM_DISPX11_OBJS=$vm_dispx11_objs
+
+VM_DISPX11_BITBLT_FLAGS=$vm_dispx11_bitblt_flags
+
 if test "${plibs}"; then
   llibs="${LIBS}"
   for l in ${plibs}; do
@@ -27697,16 +27721,34 @@
 plugin="BitBltPlugin"
 plibs=""
 rm -f BitBltPlugin.sub BitBltPlugin.lib
+bitblt_objs="BitBltPlugin.o"
+bitblt_flags=""
+arm_arch=""
+
 case $host_cpu in
 arm*)
-bitblt_objs="BitBltPlugin$o BitBltArm$o BitBltArmLinux$o BitBltArmOther$o BitBltArmSimd$o BitBltDispatch$o BitBltGeneric$o BitBltArmSimdAlphaBlend$o BitBltArmSimdBitLogical$o BitBltArmSimdPixPaint$o BitBltArmSimdSourceWord$o"
+case $host_cpu in
+  armv6*) arm_arch="6" ;;
+  armv7*) arm_arch="7-A" ;;
+esac
+# Check whether --enable-fast-bitblt or --disable-fast-bitblt was given.
+if test "${enable_fast_bitblt+set}" = set; then
+  enableval="$enable_fast_bitblt"
+   if   test "x$enableval" = "xyes" ; then
+      bitblt_objs="BitBltPlugin.o BitBltArm.o BitBltArmLinux.o BitBltArmOther.o BitBltArmSimd.o BitBltDispatch.o BitBltGeneric.o BitBltArmSimdAlphaBlend.o BitBltArmSimdBitLogical.o BitBltArmSimdPixPaint.o BitBltArmSimdSourceWord.o"
+      bitblt_flags="-DENABLE_FAST_BLT"
+   fi
+
+fi;
 ;;
-*)
-bitblt_objs="BitBltPlugin.o"
 esac
 
 BITBLT_OBJS=$bitblt_objs
 
+BITBLT_FLAGS=$bitblt_flags
+
+ARM_ARCH=$arm_arch
+
 if test "${plibs}"; then
   llibs="${LIBS}"
   for l in ${plibs}; do
@@ -27742,9 +27784,12 @@
 plugin="IA32ABI"
 plibs=""
 rm -f IA32ABI.sub IA32ABI.lib
-ia32abi_objs="IA32ABI.o AlienSUnitTestProcedures.o ia32abicc.o"
+ia32abi_objs="IA32ABI.o AlienSUnitTestProcedures.o"
 
 case $host_cpu in
+i386|i486|i586|i686)
+ia32abi_objs="IA32ABI.o AlienSUnitTestProcedures.o ia32abicc.o"
+;;
 powerpc|ppc)
 ia32abi_objs="IA32ABI.o AlienSUnitTestProcedures.o ppcia32abicc.o"
 ;;
@@ -29515,7 +29560,11 @@
 s, at X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
 s, at X_CPPFLAGS@,$X_CPPFLAGS,;t t
 s, at X_INCLUDES@,$X_INCLUDES,;t t
+s, at VM_DISPX11_OBJS@,$VM_DISPX11_OBJS,;t t
+s, at VM_DISPX11_BITBLT_FLAGS@,$VM_DISPX11_BITBLT_FLAGS,;t t
 s, at BITBLT_OBJS@,$BITBLT_OBJS,;t t
+s, at BITBLT_FLAGS@,$BITBLT_FLAGS,;t t
+s, at ARM_ARCH@,$ARM_ARCH,;t t
 s, at LIBM_CFLAGS@,$LIBM_CFLAGS,;t t
 s, at IA32ABI_OBJS@,$IA32ABI_OBJS,;t t
 s, at LIB_UUID@,$LIB_UUID,;t t

Modified: branches/Cog/platforms/unix/config/make.cfg.in
===================================================================
--- branches/Cog/platforms/unix/config/make.cfg.in	2014-10-24 22:52:56 UTC (rev 3111)
+++ branches/Cog/platforms/unix/config/make.cfg.in	2014-10-25 04:39:07 UTC (rev 3112)
@@ -93,6 +93,10 @@
 SOFLAGS=	@SOFLAGS@
 BITBLT_OBJS=	@BITBLT_OBJS@
 IA32ABI_OBJS=	@IA32ABI_OBJS@
+VM_DISPX11_OBJS= @VM_DISPX11_OBJS@
+BITBLT_FLAGS=   @BITBLT_FLAGS@
+VM_DISPX11_BITBLT_FLAGS= @VM_DISPX11_BITBLT_FLAGS@
+ARM_ARCH= @ARM_ARCH@
 LIBM_CFLAGS=	@LIBM_CFLAGS@
 
 LIBS=		@LIBS@

Modified: branches/Cog/platforms/unix/plugins/BitBltPlugin/Makefile.inc
===================================================================
--- branches/Cog/platforms/unix/plugins/BitBltPlugin/Makefile.inc	2014-10-24 22:52:56 UTC (rev 3111)
+++ branches/Cog/platforms/unix/plugins/BitBltPlugin/Makefile.inc	2014-10-25 04:39:07 UTC (rev 3112)
@@ -1 +1,5 @@
 OBJS = $(BITBLT_OBJS)
+XCFLAGS		= $(BITBLT_FLAGS)
+ASMINCLUDES = -I$(topdir)/platforms/Cross/plugins/BitBltPlugin
+ASMFLAGS = -cpu=$(ARM_ARCH)
+AS = asasm $(ASMFLAGS) $(ASMINCLUDES) -o
\ No newline at end of file

Modified: branches/Cog/platforms/unix/plugins/BitBltPlugin/acinclude.m4
===================================================================
--- branches/Cog/platforms/unix/plugins/BitBltPlugin/acinclude.m4	2014-10-24 22:52:56 UTC (rev 3111)
+++ branches/Cog/platforms/unix/plugins/BitBltPlugin/acinclude.m4	2014-10-25 04:39:07 UTC (rev 3112)
@@ -1,9 +1,24 @@
+bitblt_objs="BitBltPlugin.o"
+bitblt_flags=""
+arm_arch=""
+
 case $host_cpu in
 arm*)
-bitblt_objs="BitBltPlugin$o BitBltArm$o BitBltArmLinux$o BitBltArmOther$o BitBltArmSimd$o BitBltDispatch$o BitBltGeneric$o BitBltArmSimdAlphaBlend$o BitBltArmSimdBitLogical$o BitBltArmSimdPixPaint$o BitBltArmSimdSourceWord$o"
+case $host_cpu in
+  armv6*) arm_arch="6" ;;
+  armv7*) arm_arch="7-A" ;;
+esac
+AC_ARG_ENABLE(fast-bitblt,
+ [  --enable-fast-bitblt enable fast BitBlt optimizations (default=no)],
+ [ if   test "x$enableval" = "xyes" ; then
+      bitblt_objs="BitBltPlugin.o BitBltArm.o BitBltArmLinux.o BitBltArmOther.o BitBltArmSimd.o BitBltDispatch.o BitBltGeneric.o BitBltArmSimdAlphaBlend.o BitBltArmSimdBitLogical.o BitBltArmSimdPixPaint.o BitBltArmSimdSourceWord.o"
+      bitblt_flags="-DENABLE_FAST_BLT"
+   fi
+ ],
+ [])
 ;;
-*)
-bitblt_objs="BitBltPlugin.o"
 esac
 
 AC_SUBST(BITBLT_OBJS, $bitblt_objs)
+AC_SUBST(BITBLT_FLAGS, $bitblt_flags)
+AC_SUBST(ARM_ARCH, $arm_arch)

Modified: branches/Cog/platforms/unix/vm-display-X11/Makefile.in
===================================================================
--- branches/Cog/platforms/unix/vm-display-X11/Makefile.in	2014-10-24 22:52:56 UTC (rev 3111)
+++ branches/Cog/platforms/unix/vm-display-X11/Makefile.in	2014-10-25 04:39:07 UTC (rev 3112)
@@ -42,25 +42,18 @@
 
 TARGET		= vm-display-X11$a
 
+OBJS = $(VM_DISPX11_OBJS)
+XCFLAGS		= $(VM_DISPX11_BITBLT_FLAGS)
+ASMINCLUDES = -I$(topdir)/platforms/Cross/plugins/BitBltPlugin
+ASMFLAGS = -cpu=$(ARM_ARCH)
+AS = asasm $(ASMFLAGS) $(ASMINCLUDES) -o
 
-XCFLAGS		= $(X_CFLAGS)
-
 XINCLUDES	= [includes] $(X_INCLUDES) \
 		  -I$(topdir)/platforms/Cross/plugins/FilePlugin \
 		  -I$(topdir)/platforms/Cross/plugins/B3DAcceleratorPlugin \
 		  -I$(topdir)/platforms/unix/plugins/B3DAcceleratorPlugin \
 		  -I/usr/X11R6/include
 
-ifeq (,$(findstring ENABLE_FAST_BLT,$(CFLAGS)))
-   OBJS		= sqUnixX11$o sqUnixMozilla$o
-else
-   ASMINCLUDES = -I$(topdir)/platforms/Cross/plugins/BitBltPlugin
-   ASMFLAGS = -cpu=6
-   AS          = asasm $(ASMFLAGS) $(ASMINCLUDES) -o
-   XCFLAGS		= $(X_CFLAGS) -DUSE_FAST_BLT=1
-   OBJS		   = sqUnixX11$o sqUnixMozilla$o sqUnixX11Arm$o
-endif
-
 $(TARGET) : $(OBJS) Makefile
 	$(LINK) $(TARGET) $(OBJS) $(X_LIBS)
 	$(RANLIB) $(TARGET)

Modified: branches/Cog/platforms/unix/vm-display-X11/acinclude.m4
===================================================================
--- branches/Cog/platforms/unix/vm-display-X11/acinclude.m4	2014-10-24 22:52:56 UTC (rev 3111)
+++ branches/Cog/platforms/unix/vm-display-X11/acinclude.m4	2014-10-25 04:39:07 UTC (rev 3112)
@@ -10,6 +10,23 @@
   [have_gl="$withval"],
   [have_gl="yes"])
 
+vm_dispx11_objs="sqUnixX11.lo sqUnixMozilla.lo"
+vm_dispx11_bitblt_flags=""
+
+case $host_cpu in
+arm*)
+AC_ARG_ENABLE(fast-bitblt,
+ [  --enable-fast-bitblt enable fast BitBlt optimizations (default=no)],
+ [ if   test "x$enableval" = "xyes" ; then
+      vm_dispx11_objs="sqUnixX11.lo sqUnixMozilla.lo sqUnixX11Arm.lo"
+      vm_dispx11_bitblt_flags="-DENABLE_FAST_BLT"
+   fi
+ ],
+ [])
+;;
+esac
+
+
 ###xxx FIXME (AGAIN): mandrake needs explicit -lpthread
 
 VMLIBS=${LIBS}
@@ -63,3 +80,6 @@
 CFLAGS=${VMCFLAGS}
 CPPFLAGS=${VMCPPFLAGS}
 INCLUDES=${VMINCLUDES}
+
+AC_SUBST(VM_DISPX11_OBJS, $vm_dispx11_objs)
+AC_SUBST(VM_DISPX11_BITBLT_FLAGS, $vm_dispx11_bitblt_flags)

Modified: branches/Cog/platforms/unix/vm-display-X11/sqUnixX11.c
===================================================================
--- branches/Cog/platforms/unix/vm-display-X11/sqUnixX11.c	2014-10-24 22:52:56 UTC (rev 3111)
+++ branches/Cog/platforms/unix/vm-display-X11/sqUnixX11.c	2014-10-25 04:39:07 UTC (rev 3112)
@@ -63,7 +63,7 @@
 #undef HAVE_OPENGL_GL_H		/* don't include Quartz OpenGL if configured */
 #include "SqDisplay.h"
 
-#if defined(USE_FAST_BLT)
+#if defined(ENABLE_FAST_BLT)
   /* XXX referring to plugin variables *requires* BitBitPlugin to be included by VMM as an internal plugin */
 # if defined(__arm__)
 #   include "../../../Cross/plugins/BitBltPlugin/BitBltArm.h"
@@ -6141,7 +6141,7 @@
     }
 }
 
-#if defined(USE_FAST_BLT)
+#if defined(ENABLE_FAST_BLT)
 # if defined(__arm__)
 
     extern void armSimdConvert_x888_8_LEPacking32_8_wide(unsigned int width, unsigned int height,
@@ -6188,7 +6188,7 @@
 void copyImage32To8(int *fromImageData, int *toImageData, int width, int height,
 		    int affectedL, int affectedT, int affectedR, int affectedB)
 {
-#if defined(USE_FAST_BLT)
+#if defined(ENABLE_FAST_BLT)
 # if defined(__arm__)
     armSimdCopyImage32To8(fromImageData, toImageData, width, height, affectedL, affectedT, affectedR, affectedB, stDownGradingColors);
 # else
@@ -6227,7 +6227,7 @@
     firstWord8+= scanLine8;
   }
 #undef map32To8
-#endif /* !USE_FAST_BLT */
+#endif /* !ENABLE_FAST_BLT */
 }
 
 void copyImage16To32(int *fromImageData, int *toImageData, int width, int height,
@@ -6352,7 +6352,7 @@
 #undef map16To24
 }
 
-#if defined(USE_FAST_BLT)
+#if defined(ENABLE_FAST_BLT)
 # if defined(__arm__)
 
     extern void armSimdConvert_x888_0565_LEPacking32_16_wide(unsigned int width, unsigned int height,
@@ -6394,7 +6394,7 @@
 void copyImage32To16(int *fromImageData, int *toImageData, int width, int height,
 		     int affectedL, int affectedT, int affectedR, int affectedB)
 {
-#if defined(USE_FAST_BLT)
+#if defined(ENABLE_FAST_BLT)
 # if defined(__arm__)
   if (stRNMask == 5 && stRShift == 11 && stGNMask == 6 && stGShift == 5 && stBNMask == 5 && stBShift == 0)
     armSimdCopyImage32To16(fromImageData, toImageData, width, height, affectedL, affectedT, affectedR, affectedB);
@@ -6489,7 +6489,7 @@
 }
 
 
-#if defined(USE_FAST_BLT)
+#if defined(ENABLE_FAST_BLT)
 # if defined(__arm__)
     extern void armSimdConvert_x888_x888BGR_LEPacking32_32_wide(unsigned int width, unsigned int height,
 								unsigned int *dst, unsigned int dstStride,
@@ -6525,13 +6525,13 @@
 void copyImage32To32(int *fromImageData, int *toImageData, int width, int height,
 		     int affectedL, int affectedT, int affectedR, int affectedB)
 {
-#if defined(USE_FAST_BLT)
+#if defined(ENABLE_FAST_BLT)
 # if defined(__arm__)
     if ((armCpuFeatures & ARM_V6) && stRNMask == 8 && stRShift == 0 && stGNMask == 8 && stGShift == 8 && stBNMask == 8 && stBShift == 16)
       armSimdCopyImage32To32(fromImageData, toImageData, width, height, affectedL, affectedT, affectedR, affectedB);
     else
 # else
-#  error unsupported use of USE_FAST_BLT
+#  error unsupported use of ENABLE_FAST_BLT
 # endif
 #endif
   {

Modified: branches/Cog/platforms/unix/vm-display-null/Makefile.inc
===================================================================
--- branches/Cog/platforms/unix/vm-display-null/Makefile.inc	2014-10-24 22:52:56 UTC (rev 3111)
+++ branches/Cog/platforms/unix/vm-display-null/Makefile.inc	2014-10-25 04:39:07 UTC (rev 3112)
@@ -1,2 +1,2 @@
 XCPPFLAGS=	-I$(topdir)/platforms/unix/plugins/B3DAcceleratorPlugin
-XCFLAGS=	$(WFLAGS) $(X_CFLAGS) $(X_INCLUDES)
+XCFLAGS=	$(WFLAGS) $(X_INCLUDES)



More information about the Vm-dev mailing list