]> git.proxmox.com Git - qemu.git/commitdiff
Merge branch 'upstream' of git://qemu.weilnetz.de/qemu
authorBlue Swirl <blauwirbel@gmail.com>
Sat, 3 Mar 2012 17:59:06 +0000 (17:59 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 3 Mar 2012 17:59:06 +0000 (17:59 +0000)
* 'upstream' of git://qemu.weilnetz.de/qemu:
  Move definition of HOST_LONG_BITS to qemu-common.h
  target-xtensa: Clean includes
  target-unicore32: Clean includes
  target-sh4: Clean includes
  target-s390x: Clean includes
  target-ppc: Clean includes
  target-mips: Clean includes
  target-microblaze: Clean includes
  target-m68k: Clean includes
  target-lm32: Clean includes
  target-i386: Clean includes
  target-cris: Clean includes
  target-arm: Clean includes
  target-alpha: Clean includes
  Remove macro HOST_LONG_SIZE

35 files changed:
configure
cpu-defs.h
qemu-common.h
target-alpha/cpu.h
target-alpha/translate.c
target-arm/helper.c
target-cris/cpu.h
target-cris/helper.c
target-cris/mmu.c
target-cris/translate.c
target-i386/helper.c
target-i386/op_helper.c
target-lm32/cpu.h
target-lm32/helper.c
target-lm32/translate.c
target-m68k/cpu.h
target-m68k/helper.c
target-m68k/translate.c
target-microblaze/cpu.h
target-microblaze/helper.c
target-microblaze/mmu.c
target-microblaze/translate.c
target-mips/translate.c
target-ppc/helper.c
target-ppc/translate.c
target-s390x/cpu.h
target-s390x/helper.c
target-s390x/translate.c
target-sh4/translate.c
target-unicore32/cpu.h
target-unicore32/helper.c
target-xtensa/core-dc232b.c
target-xtensa/core-fsf.c
target-xtensa/helper.c
thunk.h

index 7e69ea886444f3c9a3c0ac1f2f8b85190f69fb4e..a5eb8323e9d5cce73cc540cb92b5a242bf422d62 100755 (executable)
--- a/configure
+++ b/configure
@@ -1291,17 +1291,6 @@ esac
 
 fi
 
-# host long bits test, actually a pointer size test
-cat > $TMPC << EOF
-int sizeof_pointer_is_8[sizeof(void *) == 8 ? 1 : -1];
-EOF
-if compile_object; then
-hostlongbits=64
-else
-hostlongbits=32
-fi
-
-
 ##########################################
 # NPTL probe
 
@@ -2988,7 +2977,6 @@ fi
 if test "$bigendian" = "yes" ; then
   echo "HOST_WORDS_BIGENDIAN=y" >> $config_host_mak
 fi
-echo "HOST_LONG_BITS=$hostlongbits" >> $config_host_mak
 if test "$mingw32" = "yes" ; then
   echo "CONFIG_WIN32=y" >> $config_host_mak
   rc_version=`cat $source_path/VERSION`
index 57a709b6795ddc555df045bc16849742eb2fb23d..4527cbf4f3cc34a1abb32db5a2f8487319197e6e 100644 (file)
@@ -60,8 +60,6 @@ typedef uint64_t target_ulong __attribute__((aligned(TARGET_LONG_ALIGNMENT)));
 #error TARGET_LONG_SIZE undefined
 #endif
 
-#define HOST_LONG_SIZE (HOST_LONG_BITS / 8)
-
 #define EXCP_INTERRUPT         0x10000 /* async interruption */
 #define EXCP_HLT        0x10001 /* hlt instruction reached */
 #define EXCP_DEBUG      0x10002 /* cpu stopped after a breakpoint or singlestep */
index c5e9cad35ec1ce7599eee9414aada42878e34bdf..dbfce6f4c6213edf9463b1575d7173f8b0c3f88c 100644 (file)
@@ -65,6 +65,15 @@ typedef struct Monitor Monitor;
 #define TIME_MAX LONG_MAX
 #endif
 
+/* HOST_LONG_BITS is the size of a native pointer in bits. */
+#if UINTPTR_MAX == UINT32_MAX
+# define HOST_LONG_BITS 32
+#elif UINTPTR_MAX == UINT64_MAX
+# define HOST_LONG_BITS 64
+#else
+# error Unknown pointer size
+#endif
+
 #ifndef CONFIG_IOVEC
 #define CONFIG_IOVEC
 struct iovec {
index 9d61d45ab610e9adf0ea985fbab2472f73e956f8..5cd6fd834f42ea86ebce3fee644e812071ff6955 100644 (file)
@@ -21,6 +21,7 @@
 #define __CPU_ALPHA_H__
 
 #include "config.h"
+#include "qemu-common.h"
 
 #define TARGET_LONG_BITS 64
 
index a961159d5d8004ae2698b6dce2b473e589b183b5..1d2142bfded97b951c692e783a0b0bc95ec11081 100644 (file)
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdint.h>
-#include <stdlib.h>
-#include <stdio.h>
-
 #include "cpu.h"
 #include "disas.h"
 #include "host-utils.h"
 #include "tcg-op.h"
-#include "qemu-common.h"
 
 #include "helper.h"
 #define GEN_HELPER 1
index 49293724897a632e4f61f0c2aee27829276e3f9a..abe1c30d6a7b371f461bf8f387760d9b1f57d31d 100644 (file)
@@ -1,11 +1,6 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include "cpu.h"
 #include "gdbstub.h"
 #include "helper.h"
-#include "qemu-common.h"
 #include "host-utils.h"
 #if !defined(CONFIG_USER_ONLY)
 #include "hw/loader.h"
index 453afbb66e080e6d40a9c5e42de48f69bb54cc47..222a0625a35be3b7f1f58cac4443e9591f23f3cd 100644 (file)
@@ -20,6 +20,9 @@
 #ifndef CPU_CRIS_H
 #define CPU_CRIS_H
 
+#include "config.h"
+#include "qemu-common.h"
+
 #define TARGET_LONG_BITS 32
 
 #define CPUState struct CPUCRISState
index 5bc6d810cb64d13b9eb1df6fa1db4002f105a11e..dd7f18e7f49e98fcc441b199087176efb55703ce 100644 (file)
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdio.h>
-#include <string.h>
-
-#include "config.h"
 #include "cpu.h"
 #include "mmu.h"
 #include "host-utils.h"
index d481e39352d282be7d03cc64b5f9f4418d069806..5cd8f275286d539dfd2b4d7c83d5aa30c38b4a9e 100644 (file)
 
 #ifndef CONFIG_USER_ONLY
 
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "config.h"
 #include "cpu.h"
 #include "mmu.h"
 
index 70abf8a095efed4fb9f5c44f8873a7ab99a63aa6..cbdc72c9b959e895ee49a823e44d3f33a3785cd1 100644 (file)
  * The condition code translation is in need of attention.
  */
 
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-
 #include "cpu.h"
 #include "disas.h"
 #include "tcg-op.h"
 #include "helper.h"
 #include "mmu.h"
 #include "crisv32-decode.h"
-#include "qemu-common.h"
 
 #define GEN_HELPER 1
 #include "helper.h"
index d12c9621bd7f3eaed1dd881c4cea1aea458f7756..af6bba26805b3a0f46dbbd40769f15740d1fd198 100644 (file)
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
 
 #include "cpu.h"
-#include "qemu-common.h"
 #include "kvm.h"
 #ifndef CONFIG_USER_ONLY
 #include "sysemu.h"
index 2aea71bf85e8fc7e5f56f11d5a808d2e6fa24fdd..63a08d6d9a9afcb1f1f8a4b0170c24501a8e82f8 100644 (file)
@@ -22,7 +22,6 @@
 #include "dyngen-exec.h"
 #include "host-utils.h"
 #include "ioport.h"
-#include "qemu-common.h"
 #include "qemu-log.h"
 #include "cpu-defs.h"
 #include "helper.h"
index 037ef528ed832b30850dde38da7865a6311d731b..b6b6b4c87afbe438f49095e70afc6a77597248ae 100644 (file)
@@ -24,6 +24,7 @@
 
 #define CPUState struct CPULM32State
 
+#include "config.h"
 #include "qemu-common.h"
 #include "cpu-defs.h"
 struct CPULM32State;
index fc0b444d81d7c75d15ce356ab375586bbdca32fd..2637c03c912ae3bfdf784c32601800ad0292b7b1 100644 (file)
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-#include "config.h"
 #include "cpu.h"
 #include "host-utils.h"
 
index 0be105d018dce8f57beea9bfcf338f37844940c6..c80e48b39e9d2e4f5f03680dfcf8899e8237220a 100644 (file)
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <assert.h>
-
 #include "cpu.h"
 #include "disas.h"
 #include "helper.h"
 #include "tcg-op.h"
-#include "qemu-common.h"
 
 #include "hw/lm32_pic.h"
 
index 0667f8214ad85239acb95627e8e96dbb3d8a0f88..4cc3a35f2e948bf321e41506b5f2d84de7e88ea6 100644 (file)
@@ -24,6 +24,7 @@
 
 #define CPUState struct CPUM68KState
 
+#include "config.h"
 #include "qemu-common.h"
 #include "cpu-defs.h"
 
index 674c8e6f071d86d557d5bc957098ba27902133b1..fa675bfca676216531ff2ccd360a3354c6c3caa8 100644 (file)
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdio.h>
-#include <string.h>
-
-#include "config.h"
 #include "cpu.h"
-#include "qemu-common.h"
 #include "gdbstub.h"
 
 #include "helpers.h"
index 0e7f1fe2c76e3979d4d067d2c04422997c7b2dbd..2bdd9dd1e3dff28c53b8ebdc64dcd2a66ff48847 100644 (file)
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
 
-#include "config.h"
 #include "cpu.h"
 #include "disas.h"
 #include "tcg-op.h"
index 3ecaeee3463720a73c849efe7e33a084cd8cffbe..409250649d9b773ea9befbea820ea3f14d06ef51 100644 (file)
@@ -19,6 +19,9 @@
 #ifndef CPU_MICROBLAZE_H
 #define CPU_MICROBLAZE_H
 
+#include "config.h"
+#include "qemu-common.h"
+
 #define TARGET_LONG_BITS 32
 
 #define CPUState struct CPUMBState
index 2cf28022bd22b55cd4f55dffe9becb9cb44f7f5a..e1355ff93eb228cc6d07a3cb4c8d0ee760567aa0 100644 (file)
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-#include "config.h"
 #include "cpu.h"
 #include "host-utils.h"
 
index 281fc8d8c45224dc23221e34beb888abff90c223..7c34ac0971c3b7a96718c7e0f426ec1af3e66a88 100644 (file)
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
 
-#include "config.h"
 #include "cpu.h"
 
 #define D(x)
index 96ce2ece5183041fcf965251fa9e85ddb4473895..725c2ddf9b8d6de685aa8a5e18e3092863ce749d 100644 (file)
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <assert.h>
-
 #include "cpu.h"
 #include "disas.h"
 #include "tcg-op.h"
 #include "helper.h"
 #include "microblaze-decode.h"
-#include "qemu-common.h"
 
 #define GEN_HELPER 1
 #include "helper.h"
index d5b1c765fb9d701662baa7b178afb1fa95e198d3..8361d88aa8aa92df688d93cc9578ae57fb73a148 100644 (file)
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-
 #include "cpu.h"
 #include "disas.h"
 #include "tcg-op.h"
-#include "qemu-common.h"
 
 #include "helper.h"
 #define GEN_HELPER 1
index 928fbcf3cbe99206ea80a927b63134abd03912f2..bb76a8b9e0db78d445083dfa06ca8f0c8d61538d 100644 (file)
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
 
 #include "cpu.h"
 #include "helper_regs.h"
-#include "qemu-common.h"
 #include "kvm.h"
 #include "kvm_ppc.h"
 #include "cpus.h"
index b2780dbe5580bf821d996900cf45b636fc152a0d..8573e1f775247992a14cdb3a2e499082cf9361ee 100644 (file)
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
 
 #include "cpu.h"
 #include "disas.h"
 #include "tcg-op.h"
-#include "qemu-common.h"
 #include "host-utils.h"
 
 #include "helper.h"
index b8893b30271cd10975362db63a0a17f2508b9fdc..e892beca3bbd5821ddf2541be6cccdfd50990c10 100644 (file)
@@ -19,6 +19,9 @@
 #ifndef CPU_S390X_H
 #define CPU_S390X_H
 
+#include "config.h"
+#include "qemu-common.h"
+
 #define TARGET_LONG_BITS 64
 
 #define ELF_MACHINE    EM_S390
index 10cc9dd5fa54c8c1dfca5747e36b611b8b6dcbc4..c0ec8908a674bb839267533ec17c21f070c6887e 100644 (file)
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include "cpu.h"
 #include "gdbstub.h"
-#include "qemu-common.h"
 #include "qemu-timer.h"
 #ifndef CONFIG_USER_ONLY
 #include "sysemu.h"
index ee156721857d089e2538e20263e94450a4df4f38..71f9dcdff5de268f1098dc7a55826976a030e55d 100644 (file)
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
 
 /* #define DEBUG_ILLEGAL_INSTRUCTIONS */
 /* #define DEBUG_INLINE_BRANCHES */
index aacf96d9a374c3a9512f47db985901ecfd60e5ab..dd0ee4be93af8df8d879f3b55d086af450a24acb 100644 (file)
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
 
 #define DEBUG_DISAS
 #define SH4_DEBUG_DISAS
@@ -29,7 +24,6 @@
 #include "cpu.h"
 #include "disas.h"
 #include "tcg-op.h"
-#include "qemu-common.h"
 
 #include "helper.h"
 #define GEN_HELPER 1
index b4e72cfa6e390db820195623cfb80df551a4491a..f725634801a4657f54e38fed1a86ce4667dc07e9 100644 (file)
@@ -20,6 +20,8 @@
 
 #define CPUState                struct CPUState_UniCore32
 
+#include "config.h"
+#include "qemu-common.h"
 #include "cpu-defs.h"
 #include "softfloat.h"
 
index b5b1cb7c9bb11e29af2c5f66c62d9f88f6463fee..ee7f82bdcdb4180d0e4cfcdfd6802c86296439ee 100644 (file)
@@ -5,14 +5,10 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 
 #include "cpu.h"
 #include "gdbstub.h"
 #include "helper.h"
-#include "qemu-common.h"
 #include "host-utils.h"
 
 static inline void set_feature(CPUState *env, int feature)
index b723c4ca7bbfb6e37fae706925d679470814e6f5..7c038351b375ec269014305d70609bb95fe0e91a 100644 (file)
@@ -1,7 +1,6 @@
 #include "cpu.h"
 #include "exec-all.h"
 #include "gdbstub.h"
-#include "qemu-common.h"
 #include "host-utils.h"
 
 #include "core-dc232b/core-isa.h"
index 88de4dd4bad02883fe3c9523ab16eaacd9f001d5..c11d9708e79715894690c295469752a9f4206691 100644 (file)
@@ -1,7 +1,6 @@
 #include "cpu.h"
 #include "exec-all.h"
 #include "gdbstub.h"
-#include "qemu-common.h"
 #include "host-utils.h"
 
 #include "core-fsf/core-isa.h"
index 2ef50d656e5667c138944722dcb68492fd3e7fbb..42a559f756572f15fd20bb7c417ab6660ee56409 100644 (file)
@@ -28,7 +28,6 @@
 #include "cpu.h"
 #include "exec-all.h"
 #include "gdbstub.h"
-#include "qemu-common.h"
 #include "host-utils.h"
 #if !defined(CONFIG_USER_ONLY)
 #include "hw/loader.h"
diff --git a/thunk.h b/thunk.h
index 109c541f0f3bd3bc52526456865950294df08096..98107431913ad7d580547069f4cfe5cefe4b7e59 100644 (file)
--- a/thunk.h
+++ b/thunk.h
@@ -99,7 +99,7 @@ static inline int thunk_type_size(const argtype *type_ptr, int is_host)
     case TYPE_PTRVOID:
     case TYPE_PTR:
         if (is_host) {
-            return HOST_LONG_SIZE;
+            return sizeof(void *);
         } else {
             return TARGET_ABI_BITS / 8;
         }
@@ -136,7 +136,7 @@ static inline int thunk_type_align(const argtype *type_ptr, int is_host)
     case TYPE_PTRVOID:
     case TYPE_PTR:
         if (is_host) {
-            return HOST_LONG_SIZE;
+            return sizeof(void *);
         } else {
             return TARGET_ABI_BITS / 8;
         }