revision 675:b97020f9af1c
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 675:b97020f9af1c |
parent | 674:377d987db8f2 |
child | 676:705a5707da13 |
author | nkeynes |
date | Mon May 26 11:01:42 2008 +0000 (15 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.
returned by config.guess - config.guess gets it wrong in some situations.
config.h.in | view | annotate | diff | log | ||
configure | view | annotate | diff | log | ||
configure.in | view | annotate | diff | log | ||
src/sh4/sh4trans.h | view | annotate | diff | log | ||
src/sh4/sh4x86.c | view | annotate | diff | log | ||
src/sh4/sh4x86.in | view | annotate | diff | log | ||
src/sh4/x86op.h | view | annotate | diff | log |
1.1 --- a/config.h.in Mon May 26 10:42:18 2008 +00001.2 +++ b/config.h.in Mon May 26 11:01:42 2008 +00001.3 @@ -139,6 +139,9 @@1.4 /* SH4 Translator to use (if any) */1.5 #undef SH4_TRANSLATOR1.7 +/* The size of `void *', as computed by sizeof. */1.8 +#undef SIZEOF_VOID_P1.9 +1.10 /* Define to 1 if you have the ANSI C header files. */1.11 #undef STDC_HEADERS
2.1 --- a/configure Mon May 26 10:42:18 2008 +00002.2 +++ b/configure Mon May 26 11:01:42 2008 +00002.3 @@ -5630,6 +5630,654 @@2.5 fi2.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.h2.19 +do2.20 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`2.21 +{ echo "$as_me:$LINENO: checking for $ac_header" >&52.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"; }; then2.24 + echo $ECHO_N "(cached) $ECHO_C" >&62.25 +else2.26 + cat >conftest.$ac_ext <<_ACEOF2.27 +/* confdefs.h. */2.28 +_ACEOF2.29 +cat confdefs.h >>conftest.$ac_ext2.30 +cat >>conftest.$ac_ext <<_ACEOF2.31 +/* end confdefs.h. */2.32 +$ac_includes_default2.33 +2.34 +#include <$ac_header>2.35 +_ACEOF2.36 +rm -f conftest.$ac_objext2.37 +if { (ac_try="$ac_compile"2.38 +case "(($ac_try" in2.39 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;2.40 + *) ac_try_echo=$ac_try;;2.41 +esac2.42 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&52.43 + (eval "$ac_compile") 2>conftest.er12.44 + ac_status=$?2.45 + grep -v '^ *+' conftest.er1 >conftest.err2.46 + rm -f conftest.er12.47 + cat conftest.err >&52.48 + echo "$as_me:$LINENO: \$? = $ac_status" >&52.49 + (exit $ac_status); } && {2.50 + test -z "$ac_c_werror_flag" ||2.51 + test ! -s conftest.err2.52 + } && test -s conftest.$ac_objext; then2.53 + eval "$as_ac_Header=yes"2.54 +else2.55 + echo "$as_me: failed program was:" >&52.56 +sed 's/^/| /' conftest.$ac_ext >&52.57 +2.58 + eval "$as_ac_Header=no"2.59 +fi2.60 +2.61 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext2.62 +fi2.63 +ac_res=`eval echo '${'$as_ac_Header'}'`2.64 + { echo "$as_me:$LINENO: result: $ac_res" >&52.65 +echo "${ECHO_T}$ac_res" >&6; }2.66 +if test `eval echo '${'$as_ac_Header'}'` = yes; then2.67 + cat >>confdefs.h <<_ACEOF2.68 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 12.69 +_ACEOF2.70 +2.71 +fi2.72 +2.73 +done2.74 +2.75 +2.76 +{ echo "$as_me:$LINENO: checking for void *" >&52.77 +echo $ECHO_N "checking for void *... $ECHO_C" >&6; }2.78 +if test "${ac_cv_type_void_p+set}" = set; then2.79 + echo $ECHO_N "(cached) $ECHO_C" >&62.80 +else2.81 + cat >conftest.$ac_ext <<_ACEOF2.82 +/* confdefs.h. */2.83 +_ACEOF2.84 +cat confdefs.h >>conftest.$ac_ext2.85 +cat >>conftest.$ac_ext <<_ACEOF2.86 +/* end confdefs.h. */2.87 +$ac_includes_default2.88 +typedef void * ac__type_new_;2.89 +int2.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 +_ACEOF2.100 +rm -f conftest.$ac_objext2.101 +if { (ac_try="$ac_compile"2.102 +case "(($ac_try" in2.103 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;2.104 + *) ac_try_echo=$ac_try;;2.105 +esac2.106 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&52.107 + (eval "$ac_compile") 2>conftest.er12.108 + ac_status=$?2.109 + grep -v '^ *+' conftest.er1 >conftest.err2.110 + rm -f conftest.er12.111 + cat conftest.err >&52.112 + echo "$as_me:$LINENO: \$? = $ac_status" >&52.113 + (exit $ac_status); } && {2.114 + test -z "$ac_c_werror_flag" ||2.115 + test ! -s conftest.err2.116 + } && test -s conftest.$ac_objext; then2.117 + ac_cv_type_void_p=yes2.118 +else2.119 + echo "$as_me: failed program was:" >&52.120 +sed 's/^/| /' conftest.$ac_ext >&52.121 +2.122 + ac_cv_type_void_p=no2.123 +fi2.124 +2.125 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext2.126 +fi2.127 +{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&52.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 Compiler2.131 +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects2.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 *" >&52.135 +echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }2.136 +if test "${ac_cv_sizeof_void_p+set}" = set; then2.137 + echo $ECHO_N "(cached) $ECHO_C" >&62.138 +else2.139 + if test "$cross_compiling" = yes; then2.140 + # Depending upon the size, compute the lo and hi bounds.2.141 +cat >conftest.$ac_ext <<_ACEOF2.142 +/* confdefs.h. */2.143 +_ACEOF2.144 +cat confdefs.h >>conftest.$ac_ext2.145 +cat >>conftest.$ac_ext <<_ACEOF2.146 +/* end confdefs.h. */2.147 +$ac_includes_default2.148 + typedef void * ac__type_sizeof_;2.149 +int2.150 +main ()2.151 +{2.152 +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];2.153 +test_array [0] = 02.154 +2.155 + ;2.156 + return 0;2.157 +}2.158 +_ACEOF2.159 +rm -f conftest.$ac_objext2.160 +if { (ac_try="$ac_compile"2.161 +case "(($ac_try" in2.162 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;2.163 + *) ac_try_echo=$ac_try;;2.164 +esac2.165 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&52.166 + (eval "$ac_compile") 2>conftest.er12.167 + ac_status=$?2.168 + grep -v '^ *+' conftest.er1 >conftest.err2.169 + rm -f conftest.er12.170 + cat conftest.err >&52.171 + echo "$as_me:$LINENO: \$? = $ac_status" >&52.172 + (exit $ac_status); } && {2.173 + test -z "$ac_c_werror_flag" ||2.174 + test ! -s conftest.err2.175 + } && test -s conftest.$ac_objext; then2.176 + ac_lo=0 ac_mid=02.177 + while :; do2.178 + cat >conftest.$ac_ext <<_ACEOF2.179 +/* confdefs.h. */2.180 +_ACEOF2.181 +cat confdefs.h >>conftest.$ac_ext2.182 +cat >>conftest.$ac_ext <<_ACEOF2.183 +/* end confdefs.h. */2.184 +$ac_includes_default2.185 + typedef void * ac__type_sizeof_;2.186 +int2.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] = 02.191 +2.192 + ;2.193 + return 0;2.194 +}2.195 +_ACEOF2.196 +rm -f conftest.$ac_objext2.197 +if { (ac_try="$ac_compile"2.198 +case "(($ac_try" in2.199 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;2.200 + *) ac_try_echo=$ac_try;;2.201 +esac2.202 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&52.203 + (eval "$ac_compile") 2>conftest.er12.204 + ac_status=$?2.205 + grep -v '^ *+' conftest.er1 >conftest.err2.206 + rm -f conftest.er12.207 + cat conftest.err >&52.208 + echo "$as_me:$LINENO: \$? = $ac_status" >&52.209 + (exit $ac_status); } && {2.210 + test -z "$ac_c_werror_flag" ||2.211 + test ! -s conftest.err2.212 + } && test -s conftest.$ac_objext; then2.213 + ac_hi=$ac_mid; break2.214 +else2.215 + echo "$as_me: failed program was:" >&52.216 +sed 's/^/| /' conftest.$ac_ext >&52.217 +2.218 + ac_lo=`expr $ac_mid + 1`2.219 + if test $ac_lo -le $ac_mid; then2.220 + ac_lo= ac_hi=2.221 + break2.222 + fi2.223 + ac_mid=`expr 2 '*' $ac_mid + 1`2.224 +fi2.225 +2.226 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext2.227 + done2.228 +else2.229 + echo "$as_me: failed program was:" >&52.230 +sed 's/^/| /' conftest.$ac_ext >&52.231 +2.232 + cat >conftest.$ac_ext <<_ACEOF2.233 +/* confdefs.h. */2.234 +_ACEOF2.235 +cat confdefs.h >>conftest.$ac_ext2.236 +cat >>conftest.$ac_ext <<_ACEOF2.237 +/* end confdefs.h. */2.238 +$ac_includes_default2.239 + typedef void * ac__type_sizeof_;2.240 +int2.241 +main ()2.242 +{2.243 +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];2.244 +test_array [0] = 02.245 +2.246 + ;2.247 + return 0;2.248 +}2.249 +_ACEOF2.250 +rm -f conftest.$ac_objext2.251 +if { (ac_try="$ac_compile"2.252 +case "(($ac_try" in2.253 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;2.254 + *) ac_try_echo=$ac_try;;2.255 +esac2.256 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&52.257 + (eval "$ac_compile") 2>conftest.er12.258 + ac_status=$?2.259 + grep -v '^ *+' conftest.er1 >conftest.err2.260 + rm -f conftest.er12.261 + cat conftest.err >&52.262 + echo "$as_me:$LINENO: \$? = $ac_status" >&52.263 + (exit $ac_status); } && {2.264 + test -z "$ac_c_werror_flag" ||2.265 + test ! -s conftest.err2.266 + } && test -s conftest.$ac_objext; then2.267 + ac_hi=-1 ac_mid=-12.268 + while :; do2.269 + cat >conftest.$ac_ext <<_ACEOF2.270 +/* confdefs.h. */2.271 +_ACEOF2.272 +cat confdefs.h >>conftest.$ac_ext2.273 +cat >>conftest.$ac_ext <<_ACEOF2.274 +/* end confdefs.h. */2.275 +$ac_includes_default2.276 + typedef void * ac__type_sizeof_;2.277 +int2.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] = 02.282 +2.283 + ;2.284 + return 0;2.285 +}2.286 +_ACEOF2.287 +rm -f conftest.$ac_objext2.288 +if { (ac_try="$ac_compile"2.289 +case "(($ac_try" in2.290 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;2.291 + *) ac_try_echo=$ac_try;;2.292 +esac2.293 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&52.294 + (eval "$ac_compile") 2>conftest.er12.295 + ac_status=$?2.296 + grep -v '^ *+' conftest.er1 >conftest.err2.297 + rm -f conftest.er12.298 + cat conftest.err >&52.299 + echo "$as_me:$LINENO: \$? = $ac_status" >&52.300 + (exit $ac_status); } && {2.301 + test -z "$ac_c_werror_flag" ||2.302 + test ! -s conftest.err2.303 + } && test -s conftest.$ac_objext; then2.304 + ac_lo=$ac_mid; break2.305 +else2.306 + echo "$as_me: failed program was:" >&52.307 +sed 's/^/| /' conftest.$ac_ext >&52.308 +2.309 + ac_hi=`expr '(' $ac_mid ')' - 1`2.310 + if test $ac_mid -le $ac_hi; then2.311 + ac_lo= ac_hi=2.312 + break2.313 + fi2.314 + ac_mid=`expr 2 '*' $ac_mid`2.315 +fi2.316 +2.317 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext2.318 + done2.319 +else2.320 + echo "$as_me: failed program was:" >&52.321 +sed 's/^/| /' conftest.$ac_ext >&52.322 +2.323 + ac_lo= ac_hi=2.324 +fi2.325 +2.326 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext2.327 +fi2.328 +2.329 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext2.330 +# Binary search between lo and hi bounds.2.331 +while test "x$ac_lo" != "x$ac_hi"; do2.332 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`2.333 + cat >conftest.$ac_ext <<_ACEOF2.334 +/* confdefs.h. */2.335 +_ACEOF2.336 +cat confdefs.h >>conftest.$ac_ext2.337 +cat >>conftest.$ac_ext <<_ACEOF2.338 +/* end confdefs.h. */2.339 +$ac_includes_default2.340 + typedef void * ac__type_sizeof_;2.341 +int2.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] = 02.346 +2.347 + ;2.348 + return 0;2.349 +}2.350 +_ACEOF2.351 +rm -f conftest.$ac_objext2.352 +if { (ac_try="$ac_compile"2.353 +case "(($ac_try" in2.354 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;2.355 + *) ac_try_echo=$ac_try;;2.356 +esac2.357 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&52.358 + (eval "$ac_compile") 2>conftest.er12.359 + ac_status=$?2.360 + grep -v '^ *+' conftest.er1 >conftest.err2.361 + rm -f conftest.er12.362 + cat conftest.err >&52.363 + echo "$as_me:$LINENO: \$? = $ac_status" >&52.364 + (exit $ac_status); } && {2.365 + test -z "$ac_c_werror_flag" ||2.366 + test ! -s conftest.err2.367 + } && test -s conftest.$ac_objext; then2.368 + ac_hi=$ac_mid2.369 +else2.370 + echo "$as_me: failed program was:" >&52.371 +sed 's/^/| /' conftest.$ac_ext >&52.372 +2.373 + ac_lo=`expr '(' $ac_mid ')' + 1`2.374 +fi2.375 +2.376 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext2.377 +done2.378 +case $ac_lo in2.379 +?*) ac_cv_sizeof_void_p=$ac_lo;;2.380 +'') if test "$ac_cv_type_void_p" = yes; then2.381 + { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)2.382 +See \`config.log' for more details." >&52.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 + else2.387 + ac_cv_sizeof_void_p=02.388 + fi ;;2.389 +esac2.390 +else2.391 + cat >conftest.$ac_ext <<_ACEOF2.392 +/* confdefs.h. */2.393 +_ACEOF2.394 +cat confdefs.h >>conftest.$ac_ext2.395 +cat >>conftest.$ac_ext <<_ACEOF2.396 +/* end confdefs.h. */2.397 +$ac_includes_default2.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 +int2.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 + else2.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 +_ACEOF2.430 +rm -f conftest$ac_exeext2.431 +if { (ac_try="$ac_link"2.432 +case "(($ac_try" in2.433 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;2.434 + *) ac_try_echo=$ac_try;;2.435 +esac2.436 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&52.437 + (eval "$ac_link") 2>&52.438 + ac_status=$?2.439 + echo "$as_me:$LINENO: \$? = $ac_status" >&52.440 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext'2.441 + { (case "(($ac_try" in2.442 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;2.443 + *) ac_try_echo=$ac_try;;2.444 +esac2.445 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&52.446 + (eval "$ac_try") 2>&52.447 + ac_status=$?2.448 + echo "$as_me:$LINENO: \$? = $ac_status" >&52.449 + (exit $ac_status); }; }; then2.450 + ac_cv_sizeof_void_p=`cat conftest.val`2.451 +else2.452 + echo "$as_me: program exited with status $ac_status" >&52.453 +echo "$as_me: failed program was:" >&52.454 +sed 's/^/| /' conftest.$ac_ext >&52.455 +2.456 +( exit $ac_status )2.457 +if test "$ac_cv_type_void_p" = yes; then2.458 + { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)2.459 +See \`config.log' for more details." >&52.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 + else2.464 + ac_cv_sizeof_void_p=02.465 + fi2.466 +fi2.467 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext2.468 +fi2.469 +rm -f conftest.val2.470 +fi2.471 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&52.472 +echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }2.473 +2.474 +2.475 +2.476 +cat >>confdefs.h <<_ACEOF2.477 +#define SIZEOF_VOID_P $ac_cv_sizeof_void_p2.478 +_ACEOF2.479 +2.480 +2.481 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&52.482 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }2.483 +if test "${ac_cv_header_stdc+set}" = set; then2.484 + echo $ECHO_N "(cached) $ECHO_C" >&62.485 +else2.486 + cat >conftest.$ac_ext <<_ACEOF2.487 +/* confdefs.h. */2.488 +_ACEOF2.489 +cat confdefs.h >>conftest.$ac_ext2.490 +cat >>conftest.$ac_ext <<_ACEOF2.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 +int2.498 +main ()2.499 +{2.500 +2.501 + ;2.502 + return 0;2.503 +}2.504 +_ACEOF2.505 +rm -f conftest.$ac_objext2.506 +if { (ac_try="$ac_compile"2.507 +case "(($ac_try" in2.508 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;2.509 + *) ac_try_echo=$ac_try;;2.510 +esac2.511 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&52.512 + (eval "$ac_compile") 2>conftest.er12.513 + ac_status=$?2.514 + grep -v '^ *+' conftest.er1 >conftest.err2.515 + rm -f conftest.er12.516 + cat conftest.err >&52.517 + echo "$as_me:$LINENO: \$? = $ac_status" >&52.518 + (exit $ac_status); } && {2.519 + test -z "$ac_c_werror_flag" ||2.520 + test ! -s conftest.err2.521 + } && test -s conftest.$ac_objext; then2.522 + ac_cv_header_stdc=yes2.523 +else2.524 + echo "$as_me: failed program was:" >&52.525 +sed 's/^/| /' conftest.$ac_ext >&52.526 +2.527 + ac_cv_header_stdc=no2.528 +fi2.529 +2.530 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext2.531 +2.532 +if test $ac_cv_header_stdc = yes; then2.533 + # SunOS 4.x string.h does not declare mem*, contrary to ANSI.2.534 + cat >conftest.$ac_ext <<_ACEOF2.535 +/* confdefs.h. */2.536 +_ACEOF2.537 +cat confdefs.h >>conftest.$ac_ext2.538 +cat >>conftest.$ac_ext <<_ACEOF2.539 +/* end confdefs.h. */2.540 +#include <string.h>2.541 +2.542 +_ACEOF2.543 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |2.544 + $EGREP "memchr" >/dev/null 2>&1; then2.545 + :2.546 +else2.547 + ac_cv_header_stdc=no2.548 +fi2.549 +rm -f conftest*2.550 +2.551 +fi2.552 +2.553 +if test $ac_cv_header_stdc = yes; then2.554 + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.2.555 + cat >conftest.$ac_ext <<_ACEOF2.556 +/* confdefs.h. */2.557 +_ACEOF2.558 +cat confdefs.h >>conftest.$ac_ext2.559 +cat >>conftest.$ac_ext <<_ACEOF2.560 +/* end confdefs.h. */2.561 +#include <stdlib.h>2.562 +2.563 +_ACEOF2.564 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |2.565 + $EGREP "free" >/dev/null 2>&1; then2.566 + :2.567 +else2.568 + ac_cv_header_stdc=no2.569 +fi2.570 +rm -f conftest*2.571 +2.572 +fi2.573 +2.574 +if test $ac_cv_header_stdc = yes; then2.575 + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.2.576 + if test "$cross_compiling" = yes; then2.577 + :2.578 +else2.579 + cat >conftest.$ac_ext <<_ACEOF2.580 +/* confdefs.h. */2.581 +_ACEOF2.582 +cat confdefs.h >>conftest.$ac_ext2.583 +cat >>conftest.$ac_ext <<_ACEOF2.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 +#else2.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 +#endif2.597 +2.598 +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))2.599 +int2.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 +_ACEOF2.610 +rm -f conftest$ac_exeext2.611 +if { (ac_try="$ac_link"2.612 +case "(($ac_try" in2.613 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;2.614 + *) ac_try_echo=$ac_try;;2.615 +esac2.616 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&52.617 + (eval "$ac_link") 2>&52.618 + ac_status=$?2.619 + echo "$as_me:$LINENO: \$? = $ac_status" >&52.620 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext'2.621 + { (case "(($ac_try" in2.622 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;2.623 + *) ac_try_echo=$ac_try;;2.624 +esac2.625 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&52.626 + (eval "$ac_try") 2>&52.627 + ac_status=$?2.628 + echo "$as_me:$LINENO: \$? = $ac_status" >&52.629 + (exit $ac_status); }; }; then2.630 + :2.631 +else2.632 + echo "$as_me: program exited with status $ac_status" >&52.633 +echo "$as_me: failed program was:" >&52.634 +sed 's/^/| /' conftest.$ac_ext >&52.635 +2.636 +( exit $ac_status )2.637 +ac_cv_header_stdc=no2.638 +fi2.639 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext2.640 +fi2.641 +2.642 +2.643 +fi2.644 +fi2.645 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&52.646 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; }2.647 +if test $ac_cv_header_stdc = yes; then2.648 +2.649 +cat >>confdefs.h <<\_ACEOF2.650 +#define STDC_HEADERS 12.651 +_ACEOF2.652 +2.653 +fi2.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" >&52.658 @@ -5759,75 +6407,6 @@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.h2.674 -do2.675 -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`2.676 -{ echo "$as_me:$LINENO: checking for $ac_header" >&52.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"; }; then2.679 - echo $ECHO_N "(cached) $ECHO_C" >&62.680 -else2.681 - cat >conftest.$ac_ext <<_ACEOF2.682 -/* confdefs.h. */2.683 -_ACEOF2.684 -cat confdefs.h >>conftest.$ac_ext2.685 -cat >>conftest.$ac_ext <<_ACEOF2.686 -/* end confdefs.h. */2.687 -$ac_includes_default2.688 -2.689 -#include <$ac_header>2.690 -_ACEOF2.691 -rm -f conftest.$ac_objext2.692 -if { (ac_try="$ac_compile"2.693 -case "(($ac_try" in2.694 - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;2.695 - *) ac_try_echo=$ac_try;;2.696 -esac2.697 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&52.698 - (eval "$ac_compile") 2>conftest.er12.699 - ac_status=$?2.700 - grep -v '^ *+' conftest.er1 >conftest.err2.701 - rm -f conftest.er12.702 - cat conftest.err >&52.703 - echo "$as_me:$LINENO: \$? = $ac_status" >&52.704 - (exit $ac_status); } && {2.705 - test -z "$ac_c_werror_flag" ||2.706 - test ! -s conftest.err2.707 - } && test -s conftest.$ac_objext; then2.708 - eval "$as_ac_Header=yes"2.709 -else2.710 - echo "$as_me: failed program was:" >&52.711 -sed 's/^/| /' conftest.$ac_ext >&52.712 -2.713 - eval "$as_ac_Header=no"2.714 -fi2.715 -2.716 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext2.717 -fi2.718 -ac_res=`eval echo '${'$as_ac_Header'}'`2.719 - { echo "$as_me:$LINENO: result: $ac_res" >&52.720 -echo "${ECHO_T}$ac_res" >&6; }2.721 -if test `eval echo '${'$as_ac_Header'}'` = yes; then2.722 - cat >>confdefs.h <<_ACEOF2.723 -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 12.724 -_ACEOF2.725 -2.726 -fi2.727 -2.728 -done2.729 -2.730 -2.731 cat >conftest.$ac_ext <<_ACEOF2.732 /* confdefs.h. */2.733 _ACEOF2.734 @@ -7592,20 +8171,13 @@2.737 case $host_cpu in2.738 - i386|i486|i586|i686)2.739 + i386|i486|i586|i686|x86_64)2.740 SH4_TRANSLATOR="x86"2.742 cat >>confdefs.h <<_ACEOF2.743 #define SH4_TRANSLATOR TARGET_X862.744 _ACEOF2.745 ;;2.746 - x86_64)2.747 - SH4_TRANSLATOR="x86_64"2.748 -2.749 -cat >>confdefs.h <<_ACEOF2.750 -#define SH4_TRANSLATOR TARGET_X86_642.751 -_ACEOF2.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 +00003.2 +++ b/configure.in Mon May 26 11:01:42 2008 +00003.3 @@ -9,6 +9,7 @@3.4 AC_PROG_CC3.5 AM_PROG_CC_STDC3.6 AM_PROG_AS3.7 +AC_CHECK_SIZEOF([void *])3.8 AC_HEADER_STDC3.9 AC_CANONICAL_BUILD3.10 AC_CANONICAL_HOST3.11 @@ -131,12 +132,9 @@3.13 dnl Check for a supported cpu target for translation purposes3.14 case $host_cpu in3.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 +00004.2 +++ b/src/sh4/sh4trans.h Mon May 26 11:01:42 2008 +00004.3 @@ -99,7 +99,6 @@4.4 ******************************************************************************/4.6 #define TARGET_X86 14.7 -#define TARGET_X86_64 24.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 +00005.2 +++ b/src/sh4/sh4x86.c Mon May 26 11:01:42 2008 +00005.3 @@ -293,9 +293,9 @@5.4 #define SLOTILLEGAL() JMP_exc(EXC_SLOT_ILLEGAL); sh4_x86.in_delay_slot = DELAY_NONE; return 1;5.6 /****** Import appropriate calling conventions ******/5.7 -#if SH4_TRANSLATOR == TARGET_X86_645.8 +#if SIZEOF_VOID_P == 85.9 #include "sh4/ia64abi.h"5.10 -#else /* SH4_TRANSLATOR == TARGET_X86 */5.11 +#else /* 32-bit system */5.12 #ifdef APPLE_BUILD5.13 #include "sh4/ia32mac.h"5.14 #else
6.1 --- a/src/sh4/sh4x86.in Mon May 26 10:42:18 2008 +00006.2 +++ b/src/sh4/sh4x86.in Mon May 26 11:01:42 2008 +00006.3 @@ -293,9 +293,9 @@6.4 #define SLOTILLEGAL() JMP_exc(EXC_SLOT_ILLEGAL); sh4_x86.in_delay_slot = DELAY_NONE; return 1;6.6 /****** Import appropriate calling conventions ******/6.7 -#if SH4_TRANSLATOR == TARGET_X86_646.8 +#if SIZEOF_VOID_P == 86.9 #include "sh4/ia64abi.h"6.10 -#else /* SH4_TRANSLATOR == TARGET_X86 */6.11 +#else /* 32-bit system */6.12 #ifdef APPLE_BUILD6.13 #include "sh4/ia32mac.h"6.14 #else
7.1 --- a/src/sh4/x86op.h Mon May 26 10:42:18 2008 +00007.2 +++ b/src/sh4/x86op.h Mon May 26 11:01:42 2008 +00007.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+=47.6 #define OP64(x) *((uint64_t *)xlat_output) = (x); xlat_output+=87.7 -#if SH4_TRANSLATOR == TARGET_X86_647.8 +#if SIZEOF_VOID_P == 87.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 -#else7.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 )
.