[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] target-i386/helper.c: some constants can get truncated on 3
From: |
Jindrich Makovicka |
Subject: |
[Qemu-devel] target-i386/helper.c: some constants can get truncated on 32bit |
Date: |
Tue, 1 Jul 2008 23:00:02 +0200 |
Hi,
with
./configure --target-list=x86_64-softmmu
32-bit gcc produces warnings about a few constants with an L suffix:
/home/henry/build/qemu/trunk/target-i386/helper.c: In function
‘cpu_x86_handle_mmu_fault’:
/home/henry/build/qemu/trunk/target-i386/helper.c:903:
warning: integer constant is too large for ‘long’
type /home/henry/build/qemu/trunk/target-i386/helper.c:933: warning:
integer constant is too large for ‘long’
type /home/henry/build/qemu/trunk/target-i386/helper.c:969: warning:
integer constant is too large for ‘long’
type /home/henry/build/qemu/trunk/target-i386/helper.c:977: warning:
integer constant is too large for ‘long’
type /home/henry/build/qemu/trunk/target-i386/helper.c:1012: warning:
integer constant is too large for ‘long’ type
These should be probably defined as long long to avoid truncation:
--- helper.c.orig 2008-06-16 20:25:16.000000000 +0200
+++ helper.c 2008-06-17 12:26:00.000000000 +0200
@@ -822,9 +822,9 @@
#define PHYS_ADDR_MASK 0xfffff000L
#else
# if defined(TARGET_X86_64)
-# define PHYS_ADDR_MASK 0xfffffff000L
+# define PHYS_ADDR_MASK 0xfffffff000LL
# else
-# define PHYS_ADDR_MASK 0xffffff000L
+# define PHYS_ADDR_MASK 0xffffff000LL
# endif
#endif
Regards,
--
Jindrich Makovicka
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] target-i386/helper.c: some constants can get truncated on 32bit,
Jindrich Makovicka <=