Commit b685369795f028535862cb3caddaf219c655db2a

Authored by bellard
1 parent 3f1a88f4

added HOST_LONG_BITS in configure


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1457 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 7 additions and 6 deletions
configure
@@ -246,6 +246,12 @@ fi @@ -246,6 +246,12 @@ fi
246 246
247 fi 247 fi
248 248
  249 +# host long bits test
  250 +hostlongbits="32"
  251 +if test "$cpu" = "sparc64" -o "$cpu" = "ia64" -o "$cpu" = "x86_64" -o "$cpu" = "alpha"; then
  252 + hostlongbits="64"
  253 +fi
  254 +
249 # check gcc options support 255 # check gcc options support
250 cat > $TMPC <<EOF 256 cat > $TMPC <<EOF
251 int main(void) { 257 int main(void) {
@@ -520,6 +526,7 @@ if test &quot;$bigendian&quot; = &quot;yes&quot; ; then @@ -520,6 +526,7 @@ if test &quot;$bigendian&quot; = &quot;yes&quot; ; then
520 echo "WORDS_BIGENDIAN=yes" >> $config_mak 526 echo "WORDS_BIGENDIAN=yes" >> $config_mak
521 echo "#define WORDS_BIGENDIAN 1" >> $config_h 527 echo "#define WORDS_BIGENDIAN 1" >> $config_h
522 fi 528 fi
  529 +echo "#define HOST_LONG_BITS $hostlongbits" >> $config_h
523 if test "$mingw32" = "yes" ; then 530 if test "$mingw32" = "yes" ; then
524 echo "CONFIG_WIN32=yes" >> $config_mak 531 echo "CONFIG_WIN32=yes" >> $config_mak
525 echo "#define CONFIG_WIN32 1" >> $config_h 532 echo "#define CONFIG_WIN32 1" >> $config_h
cpu-defs.h
@@ -29,12 +29,6 @@ @@ -29,12 +29,6 @@
29 #error TARGET_LONG_BITS must be defined before including this header 29 #error TARGET_LONG_BITS must be defined before including this header
30 #endif 30 #endif
31 31
32 -#if defined(__alpha__) || defined (__ia64__) || defined(__x86_64__)  
33 -#define HOST_LONG_BITS 64  
34 -#else  
35 -#define HOST_LONG_BITS 32  
36 -#endif  
37 -  
38 #ifndef TARGET_PHYS_ADDR_BITS 32 #ifndef TARGET_PHYS_ADDR_BITS
39 #if TARGET_LONG_BITS >= HOST_LONG_BITS 33 #if TARGET_LONG_BITS >= HOST_LONG_BITS
40 #define TARGET_PHYS_ADDR_BITS TARGET_LONG_BITS 34 #define TARGET_PHYS_ADDR_BITS TARGET_LONG_BITS