Search
lxdream.org :: lxdream :: r675:b97020f9af1c
lxdream 0.9.1
released Jun 29
Download Now
changeset675:b97020f9af1c
parent674:377d987db8f2
child676:705a5707da13
authornkeynes
dateMon May 26 11:01:42 2008 +0000 (11 years ago)
hange 64-bit configuration to use sizeof(void *) rather than the system id
returned by config.guess - config.guess gets it wrong in some situations.
config.h.in
configure
configure.in
src/sh4/sh4trans.h
src/sh4/sh4x86.c
src/sh4/sh4x86.in
src/sh4/x86op.h
1.1 --- a/config.h.in Mon May 26 10:42:18 2008 +0000
1.2 +++ b/config.h.in Mon May 26 11:01:42 2008 +0000
1.3 @@ -139,6 +139,9 @@
1.4 /* SH4 Translator to use (if any) */
1.5 #undef SH4_TRANSLATOR
1.6
1.7 +/* The size of `void *', as computed by sizeof. */
1.8 +#undef SIZEOF_VOID_P
1.9 +
1.10 /* Define to 1 if you have the ANSI C header files. */
1.11 #undef STDC_HEADERS
1.12
2.1 --- a/configure Mon May 26 10:42:18 2008 +0000
2.2 +++ b/configure Mon May 26 11:01:42 2008 +0000
2.3 @@ -5630,6 +5630,654 @@
2.4
2.5 fi
2.6
2.7 +# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2.8 +
2.9 +
2.10 +
2.11 +
2.12 +
2.13 +
2.14 +
2.15 +
2.16 +
2.17 +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2.18 + inttypes.h stdint.h unistd.h
2.19 +do
2.20 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2.21 +{ echo "$as_me:$LINENO: checking for $ac_header" >&5
2.22 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
2.23 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2.24 + echo $ECHO_N "(cached) $ECHO_C" >&6
2.25 +else
2.26 + cat >conftest.$ac_ext <<_ACEOF
2.27 +/* confdefs.h. */
2.28 +_ACEOF
2.29 +cat confdefs.h >>conftest.$ac_ext
2.30 +cat >>conftest.$ac_ext <<_ACEOF
2.31 +/* end confdefs.h. */
2.32 +$ac_includes_default
2.33 +
2.34 +#include <$ac_header>
2.35 +_ACEOF
2.36 +rm -f conftest.$ac_objext
2.37 +if { (ac_try="$ac_compile"
2.38 +case "(($ac_try" in
2.39 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2.40 + *) ac_try_echo=$ac_try;;
2.41 +esac
2.42 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2.43 + (eval "$ac_compile") 2>conftest.er1
2.44 + ac_status=$?
2.45 + grep -v '^ *+' conftest.er1 >conftest.err
2.46 + rm -f conftest.er1
2.47 + cat conftest.err >&5
2.48 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
2.49 + (exit $ac_status); } && {
2.50 + test -z "$ac_c_werror_flag" ||
2.51 + test ! -s conftest.err
2.52 + } && test -s conftest.$ac_objext; then
2.53 + eval "$as_ac_Header=yes"
2.54 +else
2.55 + echo "$as_me: failed program was:" >&5
2.56 +sed 's/^/| /' conftest.$ac_ext >&5
2.57 +
2.58 + eval "$as_ac_Header=no"
2.59 +fi
2.60 +
2.61 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2.62 +fi
2.63 +ac_res=`eval echo '${'$as_ac_Header'}'`
2.64 + { echo "$as_me:$LINENO: result: $ac_res" >&5
2.65 +echo "${ECHO_T}$ac_res" >&6; }
2.66 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
2.67 + cat >>confdefs.h <<_ACEOF
2.68 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2.69 +_ACEOF
2.70 +
2.71 +fi
2.72 +
2.73 +done
2.74 +
2.75 +
2.76 +{ echo "$as_me:$LINENO: checking for void *" >&5
2.77 +echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
2.78 +if test "${ac_cv_type_void_p+set}" = set; then
2.79 + echo $ECHO_N "(cached) $ECHO_C" >&6
2.80 +else
2.81 + cat >conftest.$ac_ext <<_ACEOF
2.82 +/* confdefs.h. */
2.83 +_ACEOF
2.84 +cat confdefs.h >>conftest.$ac_ext
2.85 +cat >>conftest.$ac_ext <<_ACEOF
2.86 +/* end confdefs.h. */
2.87 +$ac_includes_default
2.88 +typedef void * ac__type_new_;
2.89 +int
2.90 +main ()
2.91 +{
2.92 +if ((ac__type_new_ *) 0)
2.93 + return 0;
2.94 +if (sizeof (ac__type_new_))
2.95 + return 0;
2.96 + ;
2.97 + return 0;
2.98 +}
2.99 +_ACEOF
2.100 +rm -f conftest.$ac_objext
2.101 +if { (ac_try="$ac_compile"
2.102 +case "(($ac_try" in
2.103 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2.104 + *) ac_try_echo=$ac_try;;
2.105 +esac
2.106 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2.107 + (eval "$ac_compile") 2>conftest.er1
2.108 + ac_status=$?
2.109 + grep -v '^ *+' conftest.er1 >conftest.err
2.110 + rm -f conftest.er1
2.111 + cat conftest.err >&5
2.112 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
2.113 + (exit $ac_status); } && {
2.114 + test -z "$ac_c_werror_flag" ||
2.115 + test ! -s conftest.err
2.116 + } && test -s conftest.$ac_objext; then
2.117 + ac_cv_type_void_p=yes
2.118 +else
2.119 + echo "$as_me: failed program was:" >&5
2.120 +sed 's/^/| /' conftest.$ac_ext >&5
2.121 +
2.122 + ac_cv_type_void_p=no
2.123 +fi
2.124 +
2.125 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2.126 +fi
2.127 +{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
2.128 +echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
2.129 +
2.130 +# The cast to long int works around a bug in the HP C Compiler
2.131 +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
2.132 +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
2.133 +# This bug is HP SR number 8606223364.
2.134 +{ echo "$as_me:$LINENO: checking size of void *" >&5
2.135 +echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
2.136 +if test "${ac_cv_sizeof_void_p+set}" = set; then
2.137 + echo $ECHO_N "(cached) $ECHO_C" >&6
2.138 +else
2.139 + if test "$cross_compiling" = yes; then
2.140 + # Depending upon the size, compute the lo and hi bounds.
2.141 +cat >conftest.$ac_ext <<_ACEOF
2.142 +/* confdefs.h. */
2.143 +_ACEOF
2.144 +cat confdefs.h >>conftest.$ac_ext
2.145 +cat >>conftest.$ac_ext <<_ACEOF
2.146 +/* end confdefs.h. */
2.147 +$ac_includes_default
2.148 + typedef void * ac__type_sizeof_;
2.149 +int
2.150 +main ()
2.151 +{
2.152 +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
2.153 +test_array [0] = 0
2.154 +
2.155 + ;
2.156 + return 0;
2.157 +}
2.158 +_ACEOF
2.159 +rm -f conftest.$ac_objext
2.160 +if { (ac_try="$ac_compile"
2.161 +case "(($ac_try" in
2.162 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2.163 + *) ac_try_echo=$ac_try;;
2.164 +esac
2.165 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2.166 + (eval "$ac_compile") 2>conftest.er1
2.167 + ac_status=$?
2.168 + grep -v '^ *+' conftest.er1 >conftest.err
2.169 + rm -f conftest.er1
2.170 + cat conftest.err >&5
2.171 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
2.172 + (exit $ac_status); } && {
2.173 + test -z "$ac_c_werror_flag" ||
2.174 + test ! -s conftest.err
2.175 + } && test -s conftest.$ac_objext; then
2.176 + ac_lo=0 ac_mid=0
2.177 + while :; do
2.178 + cat >conftest.$ac_ext <<_ACEOF
2.179 +/* confdefs.h. */
2.180 +_ACEOF
2.181 +cat confdefs.h >>conftest.$ac_ext
2.182 +cat >>conftest.$ac_ext <<_ACEOF
2.183 +/* end confdefs.h. */
2.184 +$ac_includes_default
2.185 + typedef void * ac__type_sizeof_;
2.186 +int
2.187 +main ()
2.188 +{
2.189 +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
2.190 +test_array [0] = 0
2.191 +
2.192 + ;
2.193 + return 0;
2.194 +}
2.195 +_ACEOF
2.196 +rm -f conftest.$ac_objext
2.197 +if { (ac_try="$ac_compile"
2.198 +case "(($ac_try" in
2.199 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2.200 + *) ac_try_echo=$ac_try;;
2.201 +esac
2.202 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2.203 + (eval "$ac_compile") 2>conftest.er1
2.204 + ac_status=$?
2.205 + grep -v '^ *+' conftest.er1 >conftest.err
2.206 + rm -f conftest.er1
2.207 + cat conftest.err >&5
2.208 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
2.209 + (exit $ac_status); } && {
2.210 + test -z "$ac_c_werror_flag" ||
2.211 + test ! -s conftest.err
2.212 + } && test -s conftest.$ac_objext; then
2.213 + ac_hi=$ac_mid; break
2.214 +else
2.215 + echo "$as_me: failed program was:" >&5
2.216 +sed 's/^/| /' conftest.$ac_ext >&5
2.217 +
2.218 + ac_lo=`expr $ac_mid + 1`
2.219 + if test $ac_lo -le $ac_mid; then
2.220 + ac_lo= ac_hi=
2.221 + break
2.222 + fi
2.223 + ac_mid=`expr 2 '*' $ac_mid + 1`
2.224 +fi
2.225 +
2.226 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2.227 + done
2.228 +else
2.229 + echo "$as_me: failed program was:" >&5
2.230 +sed 's/^/| /' conftest.$ac_ext >&5
2.231 +
2.232 + cat >conftest.$ac_ext <<_ACEOF
2.233 +/* confdefs.h. */
2.234 +_ACEOF
2.235 +cat confdefs.h >>conftest.$ac_ext
2.236 +cat >>conftest.$ac_ext <<_ACEOF
2.237 +/* end confdefs.h. */
2.238 +$ac_includes_default
2.239 + typedef void * ac__type_sizeof_;
2.240 +int
2.241 +main ()
2.242 +{
2.243 +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
2.244 +test_array [0] = 0
2.245 +
2.246 + ;
2.247 + return 0;
2.248 +}
2.249 +_ACEOF
2.250 +rm -f conftest.$ac_objext
2.251 +if { (ac_try="$ac_compile"
2.252 +case "(($ac_try" in
2.253 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2.254 + *) ac_try_echo=$ac_try;;
2.255 +esac
2.256 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2.257 + (eval "$ac_compile") 2>conftest.er1
2.258 + ac_status=$?
2.259 + grep -v '^ *+' conftest.er1 >conftest.err
2.260 + rm -f conftest.er1
2.261 + cat conftest.err >&5
2.262 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
2.263 + (exit $ac_status); } && {
2.264 + test -z "$ac_c_werror_flag" ||
2.265 + test ! -s conftest.err
2.266 + } && test -s conftest.$ac_objext; then
2.267 + ac_hi=-1 ac_mid=-1
2.268 + while :; do
2.269 + cat >conftest.$ac_ext <<_ACEOF
2.270 +/* confdefs.h. */
2.271 +_ACEOF
2.272 +cat confdefs.h >>conftest.$ac_ext
2.273 +cat >>conftest.$ac_ext <<_ACEOF
2.274 +/* end confdefs.h. */
2.275 +$ac_includes_default
2.276 + typedef void * ac__type_sizeof_;
2.277 +int
2.278 +main ()
2.279 +{
2.280 +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
2.281 +test_array [0] = 0
2.282 +
2.283 + ;
2.284 + return 0;
2.285 +}
2.286 +_ACEOF
2.287 +rm -f conftest.$ac_objext
2.288 +if { (ac_try="$ac_compile"
2.289 +case "(($ac_try" in
2.290 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2.291 + *) ac_try_echo=$ac_try;;
2.292 +esac
2.293 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2.294 + (eval "$ac_compile") 2>conftest.er1
2.295 + ac_status=$?
2.296 + grep -v '^ *+' conftest.er1 >conftest.err
2.297 + rm -f conftest.er1
2.298 + cat conftest.err >&5
2.299 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
2.300 + (exit $ac_status); } && {
2.301 + test -z "$ac_c_werror_flag" ||
2.302 + test ! -s conftest.err
2.303 + } && test -s conftest.$ac_objext; then
2.304 + ac_lo=$ac_mid; break
2.305 +else
2.306 + echo "$as_me: failed program was:" >&5
2.307 +sed 's/^/| /' conftest.$ac_ext >&5
2.308 +
2.309 + ac_hi=`expr '(' $ac_mid ')' - 1`
2.310 + if test $ac_mid -le $ac_hi; then
2.311 + ac_lo= ac_hi=
2.312 + break
2.313 + fi
2.314 + ac_mid=`expr 2 '*' $ac_mid`
2.315 +fi
2.316 +
2.317 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2.318 + done
2.319 +else
2.320 + echo "$as_me: failed program was:" >&5
2.321 +sed 's/^/| /' conftest.$ac_ext >&5
2.322 +
2.323 + ac_lo= ac_hi=
2.324 +fi
2.325 +
2.326 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2.327 +fi
2.328 +
2.329 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2.330 +# Binary search between lo and hi bounds.
2.331 +while test "x$ac_lo" != "x$ac_hi"; do
2.332 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
2.333 + cat >conftest.$ac_ext <<_ACEOF
2.334 +/* confdefs.h. */
2.335 +_ACEOF
2.336 +cat confdefs.h >>conftest.$ac_ext
2.337 +cat >>conftest.$ac_ext <<_ACEOF
2.338 +/* end confdefs.h. */
2.339 +$ac_includes_default
2.340 + typedef void * ac__type_sizeof_;
2.341 +int
2.342 +main ()
2.343 +{
2.344 +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
2.345 +test_array [0] = 0
2.346 +
2.347 + ;
2.348 + return 0;
2.349 +}
2.350 +_ACEOF
2.351 +rm -f conftest.$ac_objext
2.352 +if { (ac_try="$ac_compile"
2.353 +case "(($ac_try" in
2.354 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2.355 + *) ac_try_echo=$ac_try;;
2.356 +esac
2.357 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2.358 + (eval "$ac_compile") 2>conftest.er1
2.359 + ac_status=$?
2.360 + grep -v '^ *+' conftest.er1 >conftest.err
2.361 + rm -f conftest.er1
2.362 + cat conftest.err >&5
2.363 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
2.364 + (exit $ac_status); } && {
2.365 + test -z "$ac_c_werror_flag" ||
2.366 + test ! -s conftest.err
2.367 + } && test -s conftest.$ac_objext; then
2.368 + ac_hi=$ac_mid
2.369 +else
2.370 + echo "$as_me: failed program was:" >&5
2.371 +sed 's/^/| /' conftest.$ac_ext >&5
2.372 +
2.373 + ac_lo=`expr '(' $ac_mid ')' + 1`
2.374 +fi
2.375 +
2.376 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2.377 +done
2.378 +case $ac_lo in
2.379 +?*) ac_cv_sizeof_void_p=$ac_lo;;
2.380 +'') if test "$ac_cv_type_void_p" = yes; then
2.381 + { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
2.382 +See \`config.log' for more details." >&5
2.383 +echo "$as_me: error: cannot compute sizeof (void *)
2.384 +See \`config.log' for more details." >&2;}
2.385 + { (exit 77); exit 77; }; }
2.386 + else
2.387 + ac_cv_sizeof_void_p=0
2.388 + fi ;;
2.389 +esac
2.390 +else
2.391 + cat >conftest.$ac_ext <<_ACEOF
2.392 +/* confdefs.h. */
2.393 +_ACEOF
2.394 +cat confdefs.h >>conftest.$ac_ext
2.395 +cat >>conftest.$ac_ext <<_ACEOF
2.396 +/* end confdefs.h. */
2.397 +$ac_includes_default
2.398 + typedef void * ac__type_sizeof_;
2.399 +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
2.400 +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
2.401 +#include <stdio.h>
2.402 +#include <stdlib.h>
2.403 +int
2.404 +main ()
2.405 +{
2.406 +
2.407 + FILE *f = fopen ("conftest.val", "w");
2.408 + if (! f)
2.409 + return 1;
2.410 + if (((long int) (sizeof (ac__type_sizeof_))) < 0)
2.411 + {
2.412 + long int i = longval ();
2.413 + if (i != ((long int) (sizeof (ac__type_sizeof_))))
2.414 + return 1;
2.415 + fprintf (f, "%ld\n", i);
2.416 + }
2.417 + else
2.418 + {
2.419 + unsigned long int i = ulongval ();
2.420 + if (i != ((long int) (sizeof (ac__type_sizeof_))))
2.421 + return 1;
2.422 + fprintf (f, "%lu\n", i);
2.423 + }
2.424 + return ferror (f) || fclose (f) != 0;
2.425 +
2.426 + ;
2.427 + return 0;
2.428 +}
2.429 +_ACEOF
2.430 +rm -f conftest$ac_exeext
2.431 +if { (ac_try="$ac_link"
2.432 +case "(($ac_try" in
2.433 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2.434 + *) ac_try_echo=$ac_try;;
2.435 +esac
2.436 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2.437 + (eval "$ac_link") 2>&5
2.438 + ac_status=$?
2.439 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
2.440 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2.441 + { (case "(($ac_try" in
2.442 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2.443 + *) ac_try_echo=$ac_try;;
2.444 +esac
2.445 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2.446 + (eval "$ac_try") 2>&5
2.447 + ac_status=$?
2.448 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
2.449 + (exit $ac_status); }; }; then
2.450 + ac_cv_sizeof_void_p=`cat conftest.val`
2.451 +else
2.452 + echo "$as_me: program exited with status $ac_status" >&5
2.453 +echo "$as_me: failed program was:" >&5
2.454 +sed 's/^/| /' conftest.$ac_ext >&5
2.455 +
2.456 +( exit $ac_status )
2.457 +if test "$ac_cv_type_void_p" = yes; then
2.458 + { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
2.459 +See \`config.log' for more details." >&5
2.460 +echo "$as_me: error: cannot compute sizeof (void *)
2.461 +See \`config.log' for more details." >&2;}
2.462 + { (exit 77); exit 77; }; }
2.463 + else
2.464 + ac_cv_sizeof_void_p=0
2.465 + fi
2.466 +fi
2.467 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2.468 +fi
2.469 +rm -f conftest.val
2.470 +fi
2.471 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
2.472 +echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
2.473 +
2.474 +
2.475 +
2.476 +cat >>confdefs.h <<_ACEOF
2.477 +#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2.478 +_ACEOF
2.479 +
2.480 +
2.481 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2.482 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
2.483 +if test "${ac_cv_header_stdc+set}" = set; then
2.484 + echo $ECHO_N "(cached) $ECHO_C" >&6
2.485 +else
2.486 + cat >conftest.$ac_ext <<_ACEOF
2.487 +/* confdefs.h. */
2.488 +_ACEOF
2.489 +cat confdefs.h >>conftest.$ac_ext
2.490 +cat >>conftest.$ac_ext <<_ACEOF
2.491 +/* end confdefs.h. */
2.492 +#include <stdlib.h>
2.493 +#include <stdarg.h>
2.494 +#include <string.h>
2.495 +#include <float.h>
2.496 +
2.497 +int
2.498 +main ()
2.499 +{
2.500 +
2.501 + ;
2.502 + return 0;
2.503 +}
2.504 +_ACEOF
2.505 +rm -f conftest.$ac_objext
2.506 +if { (ac_try="$ac_compile"
2.507 +case "(($ac_try" in
2.508 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2.509 + *) ac_try_echo=$ac_try;;
2.510 +esac
2.511 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2.512 + (eval "$ac_compile") 2>conftest.er1
2.513 + ac_status=$?
2.514 + grep -v '^ *+' conftest.er1 >conftest.err
2.515 + rm -f conftest.er1
2.516 + cat conftest.err >&5
2.517 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
2.518 + (exit $ac_status); } && {
2.519 + test -z "$ac_c_werror_flag" ||
2.520 + test ! -s conftest.err
2.521 + } && test -s conftest.$ac_objext; then
2.522 + ac_cv_header_stdc=yes
2.523 +else
2.524 + echo "$as_me: failed program was:" >&5
2.525 +sed 's/^/| /' conftest.$ac_ext >&5
2.526 +
2.527 + ac_cv_header_stdc=no
2.528 +fi
2.529 +
2.530 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2.531 +
2.532 +if test $ac_cv_header_stdc = yes; then
2.533 + # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2.534 + cat >conftest.$ac_ext <<_ACEOF
2.535 +/* confdefs.h. */
2.536 +_ACEOF
2.537 +cat confdefs.h >>conftest.$ac_ext
2.538 +cat >>conftest.$ac_ext <<_ACEOF
2.539 +/* end confdefs.h. */
2.540 +#include <string.h>
2.541 +
2.542 +_ACEOF
2.543 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2.544 + $EGREP "memchr" >/dev/null 2>&1; then
2.545 + :
2.546 +else
2.547 + ac_cv_header_stdc=no
2.548 +fi
2.549 +rm -f conftest*
2.550 +
2.551 +fi
2.552 +
2.553 +if test $ac_cv_header_stdc = yes; then
2.554 + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2.555 + cat >conftest.$ac_ext <<_ACEOF
2.556 +/* confdefs.h. */
2.557 +_ACEOF
2.558 +cat confdefs.h >>conftest.$ac_ext
2.559 +cat >>conftest.$ac_ext <<_ACEOF
2.560 +/* end confdefs.h. */
2.561 +#include <stdlib.h>
2.562 +
2.563 +_ACEOF
2.564 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2.565 + $EGREP "free" >/dev/null 2>&1; then
2.566 + :
2.567 +else
2.568 + ac_cv_header_stdc=no
2.569 +fi
2.570 +rm -f conftest*
2.571 +
2.572 +fi
2.573 +
2.574 +if test $ac_cv_header_stdc = yes; then
2.575 + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2.576 + if test "$cross_compiling" = yes; then
2.577 + :
2.578 +else
2.579 + cat >conftest.$ac_ext <<_ACEOF
2.580 +/* confdefs.h. */
2.581 +_ACEOF
2.582 +cat confdefs.h >>conftest.$ac_ext
2.583 +cat >>conftest.$ac_ext <<_ACEOF
2.584 +/* end confdefs.h. */
2.585 +#include <ctype.h>
2.586 +#include <stdlib.h>
2.587 +#if ((' ' & 0x0FF) == 0x020)
2.588 +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2.589 +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2.590 +#else
2.591 +# define ISLOWER(c) \
2.592 + (('a' <= (c) && (c) <= 'i') \
2.593 + || ('j' <= (c) && (c) <= 'r') \
2.594 + || ('s' <= (c) && (c) <= 'z'))
2.595 +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2.596 +#endif
2.597 +
2.598 +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2.599 +int
2.600 +main ()
2.601 +{
2.602 + int i;
2.603 + for (i = 0; i < 256; i++)
2.604 + if (XOR (islower (i), ISLOWER (i))
2.605 + || toupper (i) != TOUPPER (i))
2.606 + return 2;
2.607 + return 0;
2.608 +}
2.609 +_ACEOF
2.610 +rm -f conftest$ac_exeext
2.611 +if { (ac_try="$ac_link"
2.612 +case "(($ac_try" in
2.613 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2.614 + *) ac_try_echo=$ac_try;;
2.615 +esac
2.616 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2.617 + (eval "$ac_link") 2>&5
2.618 + ac_status=$?
2.619 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
2.620 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2.621 + { (case "(($ac_try" in
2.622 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2.623 + *) ac_try_echo=$ac_try;;
2.624 +esac
2.625 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2.626 + (eval "$ac_try") 2>&5
2.627 + ac_status=$?
2.628 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
2.629 + (exit $ac_status); }; }; then
2.630 + :
2.631 +else
2.632 + echo "$as_me: program exited with status $ac_status" >&5
2.633 +echo "$as_me: failed program was:" >&5
2.634 +sed 's/^/| /' conftest.$ac_ext >&5
2.635 +
2.636 +( exit $ac_status )
2.637 +ac_cv_header_stdc=no
2.638 +fi
2.639 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2.640 +fi
2.641 +
2.642 +
2.643 +fi
2.644 +fi
2.645 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2.646 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
2.647 +if test $ac_cv_header_stdc = yes; then
2.648 +
2.649 +cat >>confdefs.h <<\_ACEOF
2.650 +#define STDC_HEADERS 1
2.651 +_ACEOF
2.652 +
2.653 +fi
2.654 +
2.655 # Make sure we can run config.sub.
2.656 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2.657 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2.658 @@ -5759,75 +6407,6 @@
2.659
2.660 lxdream_save_cppflags="$CPPFLAGS"
2.661 CPPFLAGS="$CPPFLAGS -x objective-c"
2.662 -# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2.663 -
2.664 -
2.665 -
2.666 -
2.667 -
2.668 -
2.669 -
2.670 -
2.671 -
2.672 -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2.673 - inttypes.h stdint.h unistd.h
2.674 -do
2.675 -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2.676 -{ echo "$as_me:$LINENO: checking for $ac_header" >&5
2.677 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
2.678 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2.679 - echo $ECHO_N "(cached) $ECHO_C" >&6
2.680 -else
2.681 - cat >conftest.$ac_ext <<_ACEOF
2.682 -/* confdefs.h. */
2.683 -_ACEOF
2.684 -cat confdefs.h >>conftest.$ac_ext
2.685 -cat >>conftest.$ac_ext <<_ACEOF
2.686 -/* end confdefs.h. */
2.687 -$ac_includes_default
2.688 -
2.689 -#include <$ac_header>
2.690 -_ACEOF
2.691 -rm -f conftest.$ac_objext
2.692 -if { (ac_try="$ac_compile"
2.693 -case "(($ac_try" in
2.694 - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2.695 - *) ac_try_echo=$ac_try;;
2.696 -esac
2.697 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2.698 - (eval "$ac_compile") 2>conftest.er1
2.699 - ac_status=$?
2.700 - grep -v '^ *+' conftest.er1 >conftest.err
2.701 - rm -f conftest.er1
2.702 - cat conftest.err >&5
2.703 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
2.704 - (exit $ac_status); } && {
2.705 - test -z "$ac_c_werror_flag" ||
2.706 - test ! -s conftest.err
2.707 - } && test -s conftest.$ac_objext; then
2.708 - eval "$as_ac_Header=yes"
2.709 -else
2.710 - echo "$as_me: failed program was:" >&5
2.711 -sed 's/^/| /' conftest.$ac_ext >&5
2.712 -
2.713 - eval "$as_ac_Header=no"
2.714 -fi
2.715 -
2.716 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2.717 -fi
2.718 -ac_res=`eval echo '${'$as_ac_Header'}'`
2.719 - { echo "$as_me:$LINENO: result: $ac_res" >&5
2.720 -echo "${ECHO_T}$ac_res" >&6; }
2.721 -if test `eval echo '${'$as_ac_Header'}'` = yes; then
2.722 - cat >>confdefs.h <<_ACEOF
2.723 -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2.724 -_ACEOF
2.725 -
2.726 -fi
2.727 -
2.728 -done
2.729 -
2.730 -
2.731 cat >conftest.$ac_ext <<_ACEOF
2.732 /* confdefs.h. */
2.733 _ACEOF
2.734 @@ -7592,20 +8171,13 @@
2.735
2.736
2.737 case $host_cpu in
2.738 - i386|i486|i586|i686)
2.739 + i386|i486|i586|i686|x86_64)
2.740 SH4_TRANSLATOR="x86"
2.741
2.742 cat >>confdefs.h <<_ACEOF
2.743 #define SH4_TRANSLATOR TARGET_X86
2.744 _ACEOF
2.745 ;;
2.746 - x86_64)
2.747 - SH4_TRANSLATOR="x86_64"
2.748 -
2.749 -cat >>confdefs.h <<_ACEOF
2.750 -#define SH4_TRANSLATOR TARGET_X86_64
2.751 -_ACEOF
2.752 -;;
2.753 *)
2.754 echo "Warning: No translator available for $host. Building emulation core only";;
2.755 esac
3.1 --- a/configure.in Mon May 26 10:42:18 2008 +0000
3.2 +++ b/configure.in Mon May 26 11:01:42 2008 +0000
3.3 @@ -9,6 +9,7 @@
3.4 AC_PROG_CC
3.5 AM_PROG_CC_STDC
3.6 AM_PROG_AS
3.7 +AC_CHECK_SIZEOF([void *])
3.8 AC_HEADER_STDC
3.9 AC_CANONICAL_BUILD
3.10 AC_CANONICAL_HOST
3.11 @@ -131,12 +132,9 @@
3.12
3.13 dnl Check for a supported cpu target for translation purposes
3.14 case $host_cpu in
3.15 - i386|i486|i586|i686)
3.16 + i386|i486|i586|i686|x86_64)
3.17 SH4_TRANSLATOR="x86"
3.18 AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,[TARGET_X86], [SH4 Translator to use (if any)] );;
3.19 - x86_64)
3.20 - SH4_TRANSLATOR="x86_64"
3.21 - AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,[TARGET_X86_64], [SH4 Translator to use (if any)] );;
3.22 *)
3.23 echo "Warning: No translator available for $host. Building emulation core only";;
3.24 esac
4.1 --- a/src/sh4/sh4trans.h Mon May 26 10:42:18 2008 +0000
4.2 +++ b/src/sh4/sh4trans.h Mon May 26 11:01:42 2008 +0000
4.3 @@ -99,7 +99,6 @@
4.4 ******************************************************************************/
4.5
4.6 #define TARGET_X86 1
4.7 -#define TARGET_X86_64 2
4.8
4.9 void sh4_translate_init( void );
4.10 void sh4_translate_begin_block( sh4addr_t pc );
5.1 --- a/src/sh4/sh4x86.c Mon May 26 10:42:18 2008 +0000
5.2 +++ b/src/sh4/sh4x86.c Mon May 26 11:01:42 2008 +0000
5.3 @@ -293,9 +293,9 @@
5.4 #define SLOTILLEGAL() JMP_exc(EXC_SLOT_ILLEGAL); sh4_x86.in_delay_slot = DELAY_NONE; return 1;
5.5
5.6 /****** Import appropriate calling conventions ******/
5.7 -#if SH4_TRANSLATOR == TARGET_X86_64
5.8 +#if SIZEOF_VOID_P == 8
5.9 #include "sh4/ia64abi.h"
5.10 -#else /* SH4_TRANSLATOR == TARGET_X86 */
5.11 +#else /* 32-bit system */
5.12 #ifdef APPLE_BUILD
5.13 #include "sh4/ia32mac.h"
5.14 #else
6.1 --- a/src/sh4/sh4x86.in Mon May 26 10:42:18 2008 +0000
6.2 +++ b/src/sh4/sh4x86.in Mon May 26 11:01:42 2008 +0000
6.3 @@ -293,9 +293,9 @@
6.4 #define SLOTILLEGAL() JMP_exc(EXC_SLOT_ILLEGAL); sh4_x86.in_delay_slot = DELAY_NONE; return 1;
6.5
6.6 /****** Import appropriate calling conventions ******/
6.7 -#if SH4_TRANSLATOR == TARGET_X86_64
6.8 +#if SIZEOF_VOID_P == 8
6.9 #include "sh4/ia64abi.h"
6.10 -#else /* SH4_TRANSLATOR == TARGET_X86 */
6.11 +#else /* 32-bit system */
6.12 #ifdef APPLE_BUILD
6.13 #include "sh4/ia32mac.h"
6.14 #else
7.1 --- a/src/sh4/x86op.h Mon May 26 10:42:18 2008 +0000
7.2 +++ b/src/sh4/x86op.h Mon May 26 11:01:42 2008 +0000
7.3 @@ -45,7 +45,7 @@
7.4 #define OP(x) *xlat_output++ = (x)
7.5 #define OP32(x) *((uint32_t *)xlat_output) = (x); xlat_output+=4
7.6 #define OP64(x) *((uint64_t *)xlat_output) = (x); xlat_output+=8
7.7 -#if SH4_TRANSLATOR == TARGET_X86_64
7.8 +#if SIZEOF_VOID_P == 8
7.9 #define OPPTR(x) OP64((uint64_t)(x))
7.10 #define AND_imm8s_rptr(imm, r1) REXW(); AND_imm8s_r32( imm, r1 )
7.11 #define MOV_moffptr_EAX(offptr) REXW(); MOV_moff32_EAX( offptr )
7.12 @@ -56,7 +56,7 @@
7.13 #define PUSH_realigned_r32(r1) REXW(); SUB_imm8s_r32(8, R_ESP); OP(0x50 + r1)
7.14 #define PUSH_imm32(imm) OP(0x68); OP32(imm);
7.15 #define PUSH_imm64(imm) REXW(); OP(0x68); OP64(imm);
7.16 -#else
7.17 +#else /* 32-bit system */
7.18 #define OPPTR(x) OP32((uint32_t)(x))
7.19 #define AND_imm8s_rptr(imm, r1) AND_imm8s_r32( imm, r1 )
7.20 #define MOV_moffptr_EAX(offptr) MOV_moff32_EAX( offptr )
.