Skip to contentSkip to conversation

Patch queue

GIT PULL In review Stefan Weil 3 participants 19 messages Feb 28, 2012 – Mar 4, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

please pull these patches from January.

Thanks,

Stefan Weil

The following changes since commit b55c952aea6de024bf1a06357b49367fba045443:

Merge remote-tracking branch 'aneesh/for-upstream' into staging (2012-02-27 11:19:27 -0600)

are available in the git repository at:

git://qemu.weilnetz.de/qemu.git upstream

for you to fetch changes up to c0fd260e9da7e6e60ea6bf1b0198a804f147073f:

Move definition of HOST_LONG_BITS to qemu-common.h (2012-02-28 22:33:43 +0100)

----------------------------------------------------------------
Stefan Weil (15):
Remove macro HOST_LONG_SIZE
target-alpha: Clean includes
target-arm: Clean includes
target-cris: Clean includes
target-i386: Clean includes
target-lm32: Clean includes
target-m68k: Clean includes
target-microblaze: Clean includes
target-mips: Clean includes
target-ppc: Clean includes
target-s390x: Clean includes
target-sh4: Clean includes
target-unicore32: Clean includes
target-xtensa: Clean includes
Move definition of HOST_LONG_BITS to qemu-common.h

 configure                     |   12 ------------
 cpu-defs.h                    |    2 --
 qemu-common.h                 |    9 +++++++++
 target-alpha/cpu.h            |    1 +
 target-alpha/translate.c      |    5 -----
 target-arm/helper.c           |    5 -----
 target-cris/cpu.h             |    3 +++
 target-cris/helper.c          |    4 ----
 target-cris/mmu.c             |    5 -----
 target-cris/translate.c       |    7 -------
 target-i386/helper.c          |    6 ------
 target-i386/op_helper.c       |    1 -
 target-lm32/cpu.h             |    1 +
 target-lm32/helper.c          |    5 -----
 target-lm32/translate.c       |    8 --------
 target-m68k/cpu.h             |    1 +
 target-m68k/helper.c          |    5 -----
 target-m68k/translate.c       |    6 ------
 target-microblaze/cpu.h       |    3 +++
 target-microblaze/helper.c    |    5 -----
 target-microblaze/mmu.c       |    4 ----
 target-microblaze/translate.c |    8 --------
 target-mips/translate.c       |    7 -------
 target-ppc/helper.c           |    6 ------
 target-ppc/translate.c        |    6 ------
 target-s390x/cpu.h            |    3 +++
 target-s390x/helper.c         |    5 -----
 target-s390x/translate.c      |    5 -----
 target-sh4/translate.c        |    6 ------
 target-unicore32/cpu.h        |    2 ++
 target-unicore32/helper.c     |    4 ----
 target-xtensa/core-dc232b.c   |    1 -
 target-xtensa/core-fsf.c      |    1 -
 target-xtensa/helper.c        |    1 -
 thunk.h                       |    4 ++--
 35 files changed, 25 insertions(+), 132 deletions(-)
#1 lore raw

PATCH 1/15 Remove macro HOST_LONG_SIZE

HOST_LONG_SIZE is simply the size of a pointer value. There is no need for this macro.

---
 cpu-defs.h |    2 --
 thunk.h    |    4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)
cpu-defs.h +0 -2
index 57a709b..4527cbf 100644
@@ -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 */
thunk.h +2 -2
index 109c541..9810743 100644
@@ -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;
         }
Signature · 1 line
1.7.9
#2 lore raw

PATCH 2/15 target-alpha: Clean includes

In reply to Stefan Weil

The change in cpu.h is needed when HOST_LONG_BITS is defined in qemu-common.h.

Cc Richard Henderson <[email protected]>
---
 target-alpha/cpu.h       |    1 +
 target-alpha/translate.c |    5 -----
 2 files changed, 1 insertions(+), 5 deletions(-)
target-alpha/cpu.h +1 -0
index 9d61d45..5cd6fd8 100644
@@ -21,6 +21,7 @@
 #define __CPU_ALPHA_H__
 
 #include "config.h"
+#include "qemu-common.h"
 
 #define TARGET_LONG_BITS 64
 
target-alpha/translate.c +0 -5
index a961159..1d2142b 100644
@@ -17,15 +17,10 @@
  * 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
Signature · 1 line
1.7.9
#3 lore raw

PATCH 3/15 target-arm: Clean includes

In reply to Stefan Weil

Remove some include statements which are not needed.

---
 target-arm/helper.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
target-arm/helper.c +0 -5
index 4929372..abe1c30 100644
@@ -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"
Signature · 1 line
1.7.9
#4 lore raw

PATCH 4/15 target-cris: Clean includes

In reply to Stefan Weil

The change in cpu.h is needed when HOST_LONG_BITS is defined in qemu-common.h.

Cc Edgar E. Iglesias <[email protected]>
---
 target-cris/cpu.h       |    3 +++
 target-cris/helper.c    |    4 ----
 target-cris/mmu.c       |    5 -----
 target-cris/translate.c |    7 -------
 4 files changed, 3 insertions(+), 16 deletions(-)
target-cris/cpu.h +3 -0
index 453afbb..222a062 100644
@@ -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
target-cris/helper.c +0 -4
index 5bc6d81..dd7f18e 100644
@@ -18,10 +18,6 @@
  * 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"
target-cris/mmu.c +0 -5
index d481e39..5cd8f27 100644
@@ -20,11 +20,6 @@
 
 #ifndef CONFIG_USER_ONLY
 
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "config.h"
 #include "cpu.h"
 #include "mmu.h"
 
target-cris/translate.c +0 -7
index 70abf8a..cbdc72c 100644
@@ -23,19 +23,12 @@
  * 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"
Signature · 1 line
1.7.9
#5 lore raw

PATCH 5/15 target-i386: Clean includes

In reply to Stefan Weil

Remove some include statements which are not needed.

---
 target-i386/helper.c    |    6 ------
 target-i386/op_helper.c |    1 -
 2 files changed, 0 insertions(+), 7 deletions(-)
target-i386/helper.c +0 -6
index 2586aff..87c6a8f 100644
@@ -16,14 +16,8 @@
  * 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"
target-i386/op_helper.c +0 -1
index 2aea71b..63a08d6 100644
@@ -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"
Signature · 1 line
1.7.9
#6 lore raw

PATCH 6/15 target-lm32: Clean includes

In reply to Stefan Weil

config.h was missing in cpu.h.

---
 target-lm32/cpu.h       |    1 +
 target-lm32/helper.c    |    5 -----
 target-lm32/translate.c |    8 --------
 3 files changed, 1 insertions(+), 13 deletions(-)
target-lm32/cpu.h +1 -0
index 037ef52..b6b6b4c 100644
@@ -24,6 +24,7 @@
 
 #define CPUState struct CPULM32State
 
+#include "config.h"
 #include "qemu-common.h"
 #include "cpu-defs.h"
 struct CPULM32State;
target-lm32/helper.c +0 -5
index fc0b444..2637c03 100644
@@ -17,11 +17,6 @@
  * 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"
 
target-lm32/translate.c +0 -8
index 0be105d..c80e48b 100644
@@ -17,18 +17,10 @@
  * 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"
 
Signature · 1 line
1.7.9
#7 lore raw

PATCH 7/15 target-m68k: Clean includes

In reply to Stefan Weil

config.h was missing in cpu.h.

---
 target-m68k/cpu.h       |    1 +
 target-m68k/helper.c    |    5 -----
 target-m68k/translate.c |    6 ------
 3 files changed, 1 insertions(+), 11 deletions(-)
target-m68k/cpu.h +1 -0
index 0667f82..4cc3a35 100644
@@ -24,6 +24,7 @@
 
 #define CPUState struct CPUM68KState
 
+#include "config.h"
 #include "qemu-common.h"
 #include "cpu-defs.h"
 
target-m68k/helper.c +0 -5
index 674c8e6..fa675bf 100644
@@ -18,12 +18,7 @@
  * 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"
target-m68k/translate.c +0 -6
index 0e7f1fe..2bdd9dd 100644
@@ -17,13 +17,7 @@
  * 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"
Signature · 1 line
1.7.9
#8 lore raw

PATCH 8/15 target-microblaze: Clean includes

In reply to Stefan Weil

The change in cpu.h is needed when HOST_LONG_BITS is defined in qemu-common.h.

---
 target-microblaze/cpu.h       |    3 +++
 target-microblaze/helper.c    |    5 -----
 target-microblaze/mmu.c       |    4 ----
 target-microblaze/translate.c |    8 --------
 4 files changed, 3 insertions(+), 17 deletions(-)
target-microblaze/cpu.h +3 -0
index 3ecaeee..4092506 100644
@@ -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
target-microblaze/helper.c +0 -5
index 2cf2802..e1355ff 100644
@@ -17,11 +17,6 @@
  * 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"
 
target-microblaze/mmu.c +0 -4
index 281fc8d..7c34ac0 100644
@@ -16,11 +16,7 @@
  * 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)
target-microblaze/translate.c +0 -8
index 96ce2ec..725c2dd 100644
@@ -17,19 +17,11 @@
  * 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"
Signature · 1 line
1.7.9
#9 lore raw

PATCH 9/15 target-mips: Clean includes

In reply to Stefan Weil

Remove some include statements which are not needed.

Cc Aurelien Jarno <[email protected]>
---
 target-mips/translate.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)
target-mips/translate.c +0 -7
index d5b1c76..8361d88 100644
@@ -20,16 +20,9 @@
  * 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
Signature · 1 line
1.7.9
#10 lore raw

Re: [Qemu-devel] [PATCH 09/15] target-mips: Clean includes

You may want to just put those includes inside an '#ifdef MIPS_DEBUG_DISAS' instead of removing them.

Although I suppose we could just add back the minimum needed along with the patches to fix the compile when MIPS_DEBUG_DISAS is defined.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Stefan Weil
Sent: Tuesday, February 28, 2012 1:47 PM
To: Anthony Liguori
Cc: Stefan Weil; [email protected]; Aurelien Jarno
Subject: [Qemu-devel] [PATCH 09/15] target-mips: Clean includes

Remove some include statements which are not needed.

Cc Aurelien Jarno <[email protected]>
---
 target-mips/translate.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)
target-mips/translate.c +0 -7
@@ -20,16 +20,9 @@
  * 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

--
1.7.9

#11 lore raw

Re: [Qemu-devel] [PATCH 09/15] target-mips: Clean includes

Am 29.02.2012 00:51, schrieb Johnson, Eric:

Quoted 3 lines

You may want to just put those includes inside an '#ifdef MIPS_DEBUG_DISAS' instead of removing them.

Although I suppose we could just add back the minimum needed along with the patches to fix the compile when MIPS_DEBUG_DISAS is defined.

Hi Eric,

those includes are redundant. I removed them here, but they are still included (cpu.h includes qemu-common.h which includes the standard includes). So there is no need for #ifdef MIPS_DEBUG_DISAS.

Compilation with MIPS_DEBUG_DISAS nevertheless fails, but it also fails with current git master. This is a problem which is not related to my patch series.

Cheers,

Stefan W.

Quoted 40 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Stefan Weil
Sent: Tuesday, February 28, 2012 1:47 PM
To: Anthony Liguori
Cc: Stefan Weil; [email protected]; Aurelien Jarno
Subject: [Qemu-devel] [PATCH 09/15] target-mips: Clean includes

Remove some include statements which are not needed.

Cc Aurelien Jarno <[email protected]>

---
target-mips/translate.c | 7 -------

1 files changed, 0 insertions(+), 7 deletions(-)
target-mips/translate.c +0 -8
@@ -20,16 +20,9 @@
 * 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
--

1.7.9

#12 lore raw

PATCH 10/15 target-ppc: Clean includes

In reply to Stefan Weil

Remove some include statements which are not needed.

---
 target-ppc/helper.c    |    6 ------
 target-ppc/translate.c |    6 ------
 2 files changed, 0 insertions(+), 12 deletions(-)
target-ppc/helper.c +0 -6
index 928fbcf..bb76a8b 100644
@@ -16,15 +16,9 @@
  * 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"
target-ppc/translate.c +0 -6
index b2780db..8573e1f 100644
@@ -17,16 +17,10 @@
  * 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"
Signature · 1 line
1.7.9
#13 lore raw

PATCH 11/15 target-s390x: Clean includes

In reply to Stefan Weil

The change in cpu.h is needed when HOST_LONG_BITS is defined in qemu-common.h.

---
 target-s390x/cpu.h       |    3 +++
 target-s390x/helper.c    |    5 -----
 target-s390x/translate.c |    5 -----
 3 files changed, 3 insertions(+), 10 deletions(-)
target-s390x/cpu.h +3 -0
index b8893b3..e892bec 100644
@@ -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
target-s390x/helper.c +0 -5
index 10cc9dd..c0ec890 100644
@@ -18,13 +18,8 @@
  * 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"
target-s390x/translate.c +0 -5
index ee15672..71f9dcd 100644
@@ -17,11 +17,6 @@
  * 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 */
Signature · 1 line
1.7.9
#14 lore raw

PATCH 12/15 target-sh4: Clean includes

In reply to Stefan Weil

Remove some include statements which are not needed.

Cc Aurelien Jarno <[email protected]>
---
 target-sh4/translate.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
target-sh4/translate.c +0 -6
index aacf96d..dd0ee4b 100644
@@ -16,11 +16,6 @@
  * 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
Signature · 1 line
1.7.9
#15 lore raw

PATCH 13/15 target-unicore32: Clean includes

In reply to Stefan Weil

The change in cpu.h is needed when HOST_LONG_BITS is defined in qemu-common.h.

---
 target-unicore32/cpu.h    |    2 ++
 target-unicore32/helper.c |    4 ----
 2 files changed, 2 insertions(+), 4 deletions(-)
target-unicore32/cpu.h +2 -0
index b4e72cf..f725634 100644
@@ -20,6 +20,8 @@
 
 #define CPUState                struct CPUState_UniCore32
 
+#include "config.h"
+#include "qemu-common.h"
 #include "cpu-defs.h"
 #include "softfloat.h"
 
target-unicore32/helper.c +0 -4
index b5b1cb7..ee7f82b 100644
@@ -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)
Signature · 1 line
1.7.9
#16 lore raw

PATCH 14/15 target-xtensa: Clean includes

In reply to Stefan Weil

Remove some include statements which are not needed.

---
 target-xtensa/core-dc232b.c |    1 -
 target-xtensa/core-fsf.c    |    1 -
 target-xtensa/helper.c      |    1 -
 3 files changed, 0 insertions(+), 3 deletions(-)
target-xtensa/core-dc232b.c +0 -1
index 4d9bd55..21b287d 100644
@@ -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"
target-xtensa/core-fsf.c +0 -1
index 7650462..763b8e5 100644
@@ -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"
target-xtensa/helper.c +0 -1
index 2a0cb1a..1264c83 100644
@@ -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"
Signature · 1 line
1.7.9
#17 lore raw

PATCH 15/15 Move definition of HOST_LONG_BITS to qemu-common.h

In reply to Stefan Weil

Like the related macro TCG_TARGET_LONG, HOST_LONG_BITS can be determined by the C preprocessor. It is also not used in Makefiles.

So there is no need to calculate it in configure, and it can be defined in qemu-common.h.

---
 configure     |   12 ------------
 qemu-common.h |    9 +++++++++
 2 files changed, 9 insertions(+), 12 deletions(-)
configure +0 -12
index d9dde96..9ae85be 100755
@@ -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`
qemu-common.h +9 -0
index c5e9cad..dbfce6f 100644
@@ -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 {
Signature · 1 line
1.7.9
#18 lore raw
In reply to Stefan Weil

Thanks, pulled.

Quoted 78 lines · Stefan Weil

Hi,

please pull these patches from January.

Thanks,

Stefan Weil

The following changes since commit b55c952aea6de024bf1a06357b49367fba045443:

 Merge remote-tracking branch 'aneesh/for-upstream' into staging (2012-02-27 11:19:27 -0600)

are available in the git repository at:

 git://qemu.weilnetz.de/qemu.git upstream

for you to fetch changes up to c0fd260e9da7e6e60ea6bf1b0198a804f147073f:

 Move definition of HOST_LONG_BITS to qemu-common.h (2012-02-28 22:33:43 +0100)

----------------------------------------------------------------
Stefan Weil (15):
     Remove macro HOST_LONG_SIZE
     target-alpha: Clean includes
     target-arm: Clean includes
     target-cris: Clean includes
     target-i386: Clean includes
     target-lm32: Clean includes
     target-m68k: Clean includes
     target-microblaze: Clean includes
     target-mips: Clean includes
     target-ppc: Clean includes
     target-s390x: Clean includes
     target-sh4: Clean includes
     target-unicore32: Clean includes
     target-xtensa: Clean includes
     Move definition of HOST_LONG_BITS to qemu-common.h

 configure                     |   12 ------------ cpu-defs.h                    |    2 -- qemu-common.h                 |    9 +++++++++ target-alpha/cpu.h            |    1 + target-alpha/translate.c      |    5 ----- target-arm/helper.c           |    5 ----- target-cris/cpu.h             |    3 +++ target-cris/helper.c          |    4 ---- target-cris/mmu.c             |    5 ----- target-cris/translate.c       |    7 ------- target-i386/helper.c          |    6 ------ target-i386/op_helper.c       |    1 - target-lm32/cpu.h             |    1 + target-lm32/helper.c          |    5 ----- target-lm32/translate.c       |    8 -------- target-m68k/cpu.h             |    1 + target-m68k/helper.c          |    5 ----- target-m68k/translate.c       |    6 ------ target-microblaze/cpu.h       |    3 +++ target-microblaze/helper.c    |    5 ----- target-microblaze/mmu.c       |    4 ---- target-microblaze/translate.c |    8 -------- target-mips/translate.c       |    7 ------- target-ppc/helper.c           |    6 ------ target-ppc/translate.c        |    6 ------ target-s390x/cpu.h            |    3 +++ target-s390x/helper.c         |    5 ----- target-s390x/translate.c      |    5 ----- target-sh4/translate.c        |    6 ------ target-unicore32/cpu.h        |    2 ++ target-unicore32/helper.c     |    4 ---- target-xtensa/core-dc232b.c   |    1 - target-xtensa/core-fsf.c      |    1 - target-xtensa/helper.c        |    1 - thunk.h                       |    4 ++--

 35 files changed, 25 insertions(+), 132 deletions(-)