Hi,
I implemented the mmx fastmemcpy function from the linux kernel sources.
I haven't implemented the fastclear function yet because the kernel only
has a page clear. If I have the time I will rewrite this so it can clear
any memory range.
I have added a configure option --enable-mmx/--disable-mmx to be able to
use plex86 on non-mmx processors although I doubt anyone would want to
run it an old non-mmx processor. For some reason the diff includes all
code that shifted some lines down because of the few lines I added. I
don't know how to avoid this (should be possible).
Freedos boots with this code and I also started my win95 diskimage.
Win95 starts but I didn't wait the full boot. (takes some time you know
;-)
If you have any more of these mini projects please tell.
I tried to copy/past the diff in this mail as text but netscape mail
seems to have a problem with it and only gets the first few lines. I
don't know if attachments come through in this mailing list but the diff
is in an attachment now. If this doesn't work, any ideas?
Greetings,
Martin DvH
? kernel/util-nexus-mmx.c
Index: config.h.in
===================================================================
RCS file: /cvsroot-plex86/plex86/config.h.in,v
retrieving revision 1.8
diff -u -r1.8 config.h.in
--- config.h.in 2001/05/15 16:49:56 1.8
+++ config.h.in 2001/05/25 01:02:52
@@ -135,6 +135,8 @@
/* limited i440FX PCI support */
#define BX_PCI_SUPPORT 0
+#define USE_MMX 0
+
#define BX_SUPPORT_CDROM 0
#if BX_SUPPORT_CDROM
/* This is the C++ class name to use if we are supporting */
Index: configure
===================================================================
RCS file: /cvsroot-plex86/plex86/configure,v
retrieving revision 1.23
diff -u -r1.23 configure
--- configure 2001/05/15 16:49:56 1.23
+++ configure 2001/05/25 01:02:56
@@ -20,6 +20,8 @@
ac_help="$ac_help
--enable-instrumentation instrumentation support"
ac_help="$ac_help
+ --enable-mmx enable use of mmx instructions"
+ac_help="$ac_help
--with-WinNT WinNT host"
ac_help="$ac_help
--with-BeOS BeOS host"
@@ -555,7 +557,7 @@
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:559: checking for $ac_word" >&5
+echo "configure:561: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -585,7 +587,7 @@
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:589: checking for $ac_word" >&5
+echo "configure:591: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -636,7 +638,7 @@
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:640: checking for $ac_word" >&5
+echo "configure:642: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -668,7 +670,7 @@
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c"
1>&6
-echo "configure:672: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:674: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -679,12 +681,12 @@
cat > conftest.$ac_ext << EOF
-#line 683 "configure"
+#line 685 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s
conftest${ac_exeext}; then
+if { (eval echo configure:690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s
+conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -710,12 +712,12 @@
{ echo "configure: error: installation or configuration problem: C compiler cannot
create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a
cross-compiler""... $ac_c" 1>&6
-echo "configure:714: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a
cross-compiler" >&5
+echo "configure:716: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a
+cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:719: checking whether we are using GNU C" >&5
+echo "configure:721: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -724,7 +726,7 @@
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:728: \"$ac_try\") 1>&5;
(eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:730: \"$ac_try\") 1>&5;
+(eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -743,7 +745,7 @@
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:747: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:749: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -779,7 +781,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:783: checking for $ac_word" >&5
+echo "configure:785: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -811,7 +813,7 @@
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""...
$ac_c" 1>&6
-echo "configure:815: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS)
works" >&5
+echo "configure:817: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS)
+works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -822,12 +824,12 @@
cat > conftest.$ac_ext << EOF
-#line 826 "configure"
+#line 828 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
-if { (eval echo configure:831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s
conftest${ac_exeext}; then
+if { (eval echo configure:833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s
+conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -853,12 +855,12 @@
{ echo "configure: error: installation or configuration problem: C++ compiler
cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a
cross-compiler""... $ac_c" 1>&6
-echo "configure:857: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a
cross-compiler" >&5
+echo "configure:859: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a
+cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:862: checking whether we are using GNU C++" >&5
+echo "configure:864: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -867,7 +869,7 @@
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:871: \"$ac_try\")
1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:873: \"$ac_try\")
+1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@@ -886,7 +888,7 @@
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:890: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:892: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -918,7 +920,7 @@
fi
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:922: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:924: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -947,7 +949,7 @@
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:951: checking for $ac_word" >&5
+echo "configure:953: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -976,7 +978,7 @@
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:980: checking how to run the C preprocessor" >&5
+echo "configure:982: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -991,13 +993,13 @@
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 995 "configure"
+#line 997 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1008,13 +1010,13 @@
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1012 "configure"
+#line 1014 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1025,13 +1027,13 @@
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1029 "configure"
+#line 1031 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1060,7 +1062,7 @@
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:1064: checking for X" >&5
+echo "configure:1066: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -1122,12 +1124,12 @@
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 1126 "configure"
+#line 1128 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1196,14 +1198,14 @@
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1200 "configure"
+#line 1202 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:1207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext}; then
+if { (eval echo configure:1209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@@ -1309,17 +1311,17 @@
case "`(uname -sr) 2>/dev/null`" in
"SunOS 5"*)
echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:1313: checking whether -R must be followed by a space" >&5
+echo "configure:1315: checking whether -R must be followed by a space" >&5
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 1316 "configure"
+#line 1318 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext}; then
+if { (eval echo configure:1325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_nospace=yes
else
@@ -1335,14 +1337,14 @@
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 1339 "configure"
+#line 1341 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext}; then
+if { (eval echo configure:1348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_space=yes
else
@@ -1374,7 +1376,7 @@
# libraries were built with DECnet support. And [EMAIL PROTECTED] says
# the Alpha needs dnet_stub (dnet does not exist).
echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:1378: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:1380: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1382,7 +1384,7 @@
ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1386 "configure"
+#line 1388 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1393,7 +1395,7 @@
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:1397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext}; then
+if { (eval echo configure:1399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1415,7 +1417,7 @@
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:1419: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:1421: checking for dnet_ntoa in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1423,7 +1425,7 @@
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1427 "configure"
+#line 1429 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1434,7 +1436,7 @@
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:1438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext}; then
+if { (eval echo configure:1440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1463,12 +1465,12 @@
# The nsl library prevents programs from opening the X display
# on Irix 5.2, according to [EMAIL PROTECTED]
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:1467: checking for gethostbyname" >&5
+echo "configure:1469: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1472 "configure"
+#line 1474 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
@@ -1491,7 +1493,7 @@
; return 0; }
EOF
-if { (eval echo configure:1495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext}; then
+if { (eval echo configure:1497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
@@ -1512,7 +1514,7 @@
if test $ac_cv_func_gethostbyname = no; then
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:1516: checking for gethostbyname in -lnsl" >&5
+echo "configure:1518: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1520,7 +1522,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1524 "configure"
+#line 1526 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1531,7 +1533,7 @@
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:1535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext}; then
+if { (eval echo configure:1537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1561,12 +1563,12 @@
# -lsocket must be given before -lnsl if both are needed.
# We assume that if connect needs -lnsl, so does gethostbyname.
echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:1565: checking for connect" >&5
+echo "configure:1567: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1570 "configure"
+#line 1572 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
@@ -1589,7 +1591,7 @@
; return 0; }
EOF
-if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext}; then
+if { (eval echo configure:1595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
@@ -1610,7 +1612,7 @@
if test $ac_cv_func_connect = no; then
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:1614: checking for connect in -lsocket" >&5
+echo "configure:1616: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1618,7 +1620,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1622 "configure"
+#line 1624 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1629,7 +1631,7 @@
connect()
; return 0; }
EOF
-if { (eval echo configure:1633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext}; then
+if { (eval echo configure:1635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1653,12 +1655,12 @@
# [EMAIL PROTECTED] says -lposix is necessary on A/UX.
echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:1657: checking for remove" >&5
+echo "configure:1659: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1662 "configure"
+#line 1664 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove(); below. */
@@ -1681,7 +1683,7 @@
; return 0; }
EOF
-if { (eval echo configure:1685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext}; then
+if { (eval echo configure:1687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_remove=yes"
else
@@ -1702,7 +1704,7 @@
if test $ac_cv_func_remove = no; then
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:1706: checking for remove in -lposix" >&5
+echo "configure:1708: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1710,7 +1712,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lposix $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1714 "configure"
+#line 1716 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1721,7 +1723,7 @@
remove()
; return 0; }
EOF
-if { (eval echo configure:1725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext}; then
+if { (eval echo configure:1727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1745,12 +1747,12 @@
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:1749: checking for shmat" >&5
+echo "configure:1751: checking for shmat" >&5
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1754 "configure"
+#line 1756 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat(); below. */
@@ -1773,7 +1775,7 @@
; return 0; }
EOF
-if { (eval echo configure:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext}; then
+if { (eval echo configure:1779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_shmat=yes"
else
@@ -1794,7 +1796,7 @@
if test $ac_cv_func_shmat = no; then
echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:1798: checking for shmat in -lipc" >&5
+echo "configure:1800: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1802,7 +1804,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lipc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1806 "configure"
+#line 1808 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1813,7 +1815,7 @@
shmat()
; return 0; }
EOF
-if { (eval echo configure:1817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext}; then
+if { (eval echo configure:1819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1846,7 +1848,7 @@
# libraries we check for below, so use a different variable.
# [EMAIL PROTECTED], [EMAIL PROTECTED]
echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:1850: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:1852: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1854,7 +1856,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1858 "configure"
+#line 1860 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1865,7 +1867,7 @@
IceConnectionNumber()
; return 0; }
EOF
-if { (eval echo configure:1869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext}; then
+if { (eval echo configure:1871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1891,21 +1893,21 @@
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1895: checking for inline" >&5
+echo "configure:1897: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1902 "configure"
+#line 1904 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; };
then
+if { (eval echo configure:1911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; };
+then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1931,7 +1933,7 @@
esac
echo $ac_n "checking size of unsigned char""... $ac_c" 1>&6
-echo "configure:1935: checking size of unsigned char" >&5
+echo "configure:1937: checking size of unsigned char" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1939,7 +1941,7 @@
ac_cv_sizeof_unsigned_char=0
else
cat > conftest.$ac_ext <<EOF
-#line 1943 "configure"
+#line 1945 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1950,7 +1952,7 @@
exit(0);
}
EOF
-if { (eval echo configure:1954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_unsigned_char=`cat conftestval`
else
@@ -1970,7 +1972,7 @@
echo $ac_n "checking size of unsigned short""... $ac_c" 1>&6
-echo "configure:1974: checking size of unsigned short" >&5
+echo "configure:1976: checking size of unsigned short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1978,7 +1980,7 @@
ac_cv_sizeof_unsigned_short=0
else
cat > conftest.$ac_ext <<EOF
-#line 1982 "configure"
+#line 1984 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1989,7 +1991,7 @@
exit(0);
}
EOF
-if { (eval echo configure:1993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_unsigned_short=`cat conftestval`
else
@@ -2009,7 +2011,7 @@
echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6
-echo "configure:2013: checking size of unsigned int" >&5
+echo "configure:2015: checking size of unsigned int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2017,7 +2019,7 @@
ac_cv_sizeof_unsigned_int=0
else
cat > conftest.$ac_ext <<EOF
-#line 2021 "configure"
+#line 2023 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2028,7 +2030,7 @@
exit(0);
}
EOF
-if { (eval echo configure:2032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_unsigned_int=`cat conftestval`
else
@@ -2048,7 +2050,7 @@
echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
-echo "configure:2052: checking size of unsigned long" >&5
+echo "configure:2054: checking size of unsigned long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2056,7 +2058,7 @@
ac_cv_sizeof_unsigned_long=0
else
cat > conftest.$ac_ext <<EOF
-#line 2060 "configure"
+#line 2062 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2067,7 +2069,7 @@
exit(0);
}
EOF
-if { (eval echo configure:2071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_unsigned_long=`cat conftestval`
else
@@ -2087,7 +2089,7 @@
echo $ac_n "checking size of unsigned long long""... $ac_c" 1>&6
-echo "configure:2091: checking size of unsigned long long" >&5
+echo "configure:2093: checking size of unsigned long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2095,7 +2097,7 @@
ac_cv_sizeof_unsigned_long_long=0
else
cat > conftest.$ac_ext <<EOF
-#line 2099 "configure"
+#line 2101 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2106,7 +2108,7 @@
exit(0);
}
EOF
-if { (eval echo configure:2110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_unsigned_long_long=`cat conftestval`
else
@@ -2128,12 +2130,12 @@
for ac_func in select
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2132: checking for $ac_func" >&5
+echo "configure:2134: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2137 "configure"
+#line 2139 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2156,7 +2158,7 @@
; return 0; }
EOF
-if { (eval echo configure:2160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext}; then
+if { (eval echo configure:2162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2184,7 +2186,7 @@
done
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2188: checking for dlopen in -ldl" >&5
+echo "configure:2190: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2192,7 +2194,7 @@
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2196 "configure"
+#line 2198 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2203,7 +2205,7 @@
dlopen()
; return 0; }
EOF
-if { (eval echo configure:2207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
-s conftest${ac_exeext}; then
+if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test
+-s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2272,7 +2274,7 @@
echo $ac_n "checking for CDROM support""... $ac_c" 1>&6
-echo "configure:2276: checking for CDROM support" >&5
+echo "configure:2278: checking for CDROM support" >&5
# Check whether --enable-cdrom or --disable-cdrom was given.
if test "${enable_cdrom+set}" = set; then
enableval="$enable_cdrom"
@@ -2314,7 +2316,7 @@
echo $ac_n "checking for instrumentation support""... $ac_c" 1>&6
-echo "configure:2318: checking for instrumentation support" >&5
+echo "configure:2320: checking for instrumentation support" >&5
# Check whether --enable-instrumentation or --disable-instrumentation was given.
if test "${enable_instrumentation+set}" = set; then
enableval="$enable_instrumentation"
@@ -2348,6 +2350,41 @@
fi
+
+echo $ac_n "checking for mmx support""... $ac_c" 1>&6
+echo "configure:2356: checking for mmx support" >&5
+# Check whether --enable-mmx or --disable-mmx was given.
+if test "${enable_mmx+set}" = set; then
+ enableval="$enable_mmx"
+ if test "$enableval" = yes; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define USE_MMX 1
+EOF
+
+ elif test "$enableval" = no; then
+ echo "$ac_t""no" 1>&6
+ cat >> confdefs.h <<\EOF
+#define USE_MMX 0
+EOF
+
+ else
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define USE_MMX 1
+EOF
+
+ fi
+else
+
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define USE_MMX 1
+EOF
+
+
+
+fi
Index: configure.in
===================================================================
RCS file: /cvsroot-plex86/plex86/configure.in,v
retrieving revision 1.24
diff -u -r1.24 configure.in
--- configure.in 2001/05/15 16:49:56 1.24
+++ configure.in 2001/05/25 01:02:56
@@ -103,6 +103,24 @@
]
)
+AC_MSG_CHECKING(for mmx support)
+AC_ARG_ENABLE(mmx,
+ [ --enable-mmx enable use of mmx instructions],
+ [if test "$enableval" = yes; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_MMX, 1)
+ elif test "$enableval" = no; then
+ AC_MSG_RESULT(no)
+ AC_DEFINE(USE_MMX, 0)
+ else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_MMX, 1)
+ fi],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_MMX, 1)
+ ]
+ )
AC_ARG_WITH(WinNT,
Index: kernel/Makefile.in
===================================================================
RCS file: /cvsroot-plex86/plex86/kernel/Makefile.in,v
retrieving revision 1.20
diff -u -r1.20 Makefile.in
--- kernel/Makefile.in 2001/05/24 18:54:18 1.20
+++ kernel/Makefile.in 2001/05/25 01:02:57
@@ -64,7 +64,7 @@
$(KERNEL_TARGET): $(HOST_O) monitor-host.o \
nexus.o flag-nexus.o print-nexus.o segment-nexus.o \
- mode-nexus.o util-nexus.o \
+ mode-nexus.o util-nexus.o util-nexus-mmx.o \
fault-mon.o phymem-mon.o panic-mon.o \
paging-mon.o system-mon.o mode-mon.o instrument-mon.o \
emulation/emu.o dt/dt.o
Index: kernel/util-nexus.c
===================================================================
RCS file: /cvsroot-plex86/plex86/kernel/util-nexus.c,v
retrieving revision 1.1
diff -u -r1.1 util-nexus.c
--- kernel/util-nexus.c 2001/05/15 16:49:56 1.1
+++ kernel/util-nexus.c 2001/05/25 01:02:57
@@ -26,7 +26,6 @@
#include "monitor.h"
-
void
mon_memzero(void *ptr, int size)
{
@@ -36,13 +35,25 @@
}
void
-mon_memcpy(void *dst, void *src, int size)
+mon_slow_memcpy(void *dst, void *src, int size)
{
char *d = dst;
char *s = src;
while (size--)
*d++ = *s++;
}
+
+
+ void
+mon_memcpy(void *dst, void *src, int size)
+{
+#if USE_MMX
+ mon_mmx_memcpy(dst,src,size);
+#else
+ mon_slow_memcpy(dst,src,size);
+#endif
+}
+
void *
mon_memset(void *dst, unsigned c, unsigned n)