diff options
author | David 'Digit' Turner <digit@android.com> | 2010-10-20 19:07:28 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2010-10-21 17:03:05 +0200 |
commit | d9b6cb97a8a9e93f1bbe5351874b03f7faa81783 (patch) | |
tree | ed29b83a936789ffcc40d1170f6ff5c0653831c6 /memcheck | |
parent | 7d98eae200f294f51ada36d9b01591fc4726dd94 (diff) | |
download | external_qemu-d9b6cb97a8a9e93f1bbe5351874b03f7faa81783.zip external_qemu-d9b6cb97a8a9e93f1bbe5351874b03f7faa81783.tar.gz external_qemu-d9b6cb97a8a9e93f1bbe5351874b03f7faa81783.tar.bz2 |
Fix linux-x86_64 build.
Fix various 64-bitness issues in the source code to
make the --try-64 option work again on Linux. Note that
the generated binary is not faster than its 32-bit variant
when it comes to benchmarking the boot sequence.
Change-Id: Iad248e033757d4cd25524a438a5dbe1cf3aca6cf
Diffstat (limited to 'memcheck')
-rw-r--r-- | memcheck/memcheck_api.h | 2 | ||||
-rw-r--r-- | memcheck/memcheck_common.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/memcheck/memcheck_api.h b/memcheck/memcheck_api.h index 1961465..9e76ecd 100644 --- a/memcheck/memcheck_api.h +++ b/memcheck/memcheck_api.h @@ -43,7 +43,7 @@ extern int memcheck_watch_call_stack; * array is used to obtain guest PC address from a translated PC address. * tcg_gen_code_common will fill it up when memchecker is enabled. The array is * declared in ./translate_all.c */ -extern target_ulong* gen_opc_tpc2gpc_ptr; +extern void** gen_opc_tpc2gpc_ptr; /* Number of (tb_pc, guest_pc) pairs stored in gen_opc_tpc2gpc array. * The variable is declared in ./translate_all.c */ diff --git a/memcheck/memcheck_common.h b/memcheck/memcheck_common.h index 668b78c..e6d12db 100644 --- a/memcheck/memcheck_common.h +++ b/memcheck/memcheck_common.h @@ -125,7 +125,7 @@ typedef struct MallocDesc { /* Helpers for addressing field in MallocDesc structure, using which emulator * reports an error back to the guest. */ -#define ALLOC_RES_OFFSET ((uint32_t)&(((MallocDesc*)0)->libc_pid)) +#define ALLOC_RES_OFFSET ((uint32_t)(ptrdiff_t)&(((MallocDesc*)0)->libc_pid)) #define ALLOC_RES_ADDRESS(p) (p + ALLOC_RES_OFFSET) /* Describes memory block info queried from emulator. This structure is passed @@ -174,7 +174,7 @@ typedef struct MallocDescQuery { /* Helpers for addressing field in MallocDescQuery structure using which * emulator reports an error back to the guest. */ -#define QUERY_RES_OFFSET ((uint32_t)&(((MallocDescQuery*)0)->libc_pid)) +#define QUERY_RES_OFFSET ((uint32_t)(ptrdiff_t)&(((MallocDescQuery*)0)->libc_pid)) #define QUERY_RES_ADDRESS(p) (p + QUERY_RES_OFFSET) /* Describes memory block that is being freed back to the heap. This structure @@ -201,7 +201,7 @@ typedef struct MallocFree { /* Helpers for addressing field in MallocFree structure, using which emulator * reports an error back to the guest. */ -#define FREE_RES_OFFSET ((uint32_t)&(((MallocFree*)0)->libc_pid)) +#define FREE_RES_OFFSET ((uint32_t)(ptrdiff_t)&(((MallocFree*)0)->libc_pid)) #define FREE_RES_ADDRESS(p) (p + FREE_RES_OFFSET) /* Extends MallocDesc structure with additional information, used by memchecker. |