[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 17/20] disas: Replace 'unsigned long' by 'uintptr_t'
From: |
Stefan Weil |
Subject: |
[Qemu-devel] [PATCH 17/20] disas: Replace 'unsigned long' by 'uintptr_t' |
Date: |
Sun, 15 Apr 2012 16:13:50 +0200 |
This is needed for w64. It changes nothing for other hosts.
Signed-off-by: Stefan Weil <address@hidden>
---
disas.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/disas.c b/disas.c
index 4f2c4e4..27071c3 100644
--- a/disas.c
+++ b/disas.c
@@ -268,7 +268,7 @@ void target_disas(FILE *out, target_ulong code,
target_ulong size, int flags)
/* Disassemble this for me please... (debugging). */
void disas(FILE *out, void *code, unsigned long size)
{
- unsigned long pc;
+ uintptr_t pc;
int count;
struct disassemble_info disasm_info;
int (*print_insn)(bfd_vma pc, disassemble_info *info);
@@ -276,7 +276,7 @@ void disas(FILE *out, void *code, unsigned long size)
INIT_DISASSEMBLE_INFO(disasm_info, out, fprintf);
disasm_info.buffer = code;
- disasm_info.buffer_vma = (unsigned long)code;
+ disasm_info.buffer_vma = (uintptr_t)code;
disasm_info.buffer_length = size;
#ifdef HOST_WORDS_BIGENDIAN
@@ -320,8 +320,8 @@ void disas(FILE *out, void *code, unsigned long size)
(long) code);
return;
#endif
- for (pc = (unsigned long)code; size > 0; pc += count, size -= count) {
- fprintf(out, "0x%08lx: ", pc);
+ for (pc = (uintptr_t)code; size > 0; pc += count, size -= count) {
+ fprintf(out, "0x%08" PRIxPTR ": ", pc);
count = print_insn(pc, &disasm_info);
fprintf(out, "\n");
if (count < 0)
--
1.7.0.4
- [Qemu-devel] [PATCH 16/20] cpu-exec: Remove non-portable type cast and fix format string, (continued)
- [Qemu-devel] [PATCH 16/20] cpu-exec: Remove non-portable type cast and fix format string, Stefan Weil, 2012/04/15
- [Qemu-devel] [PATCH 19/20] w64: Fix time conversion for some versions of MinGW-w64, Stefan Weil, 2012/04/15
- [Qemu-devel] [PATCH 12/20] w64: Fix data types in softmmu*.h, Stefan Weil, 2012/04/15
- [Qemu-devel] [PATCH 20/20] block: Avoid compiler warning for w64, Stefan Weil, 2012/04/15
- [Qemu-devel] [PATCH 18/20] nbd: Fix compiler warning (w64), Stefan Weil, 2012/04/15
- [Qemu-devel] [PATCH 15/20] target-ppc: Fix type casts for w64 (uintptr_t), Stefan Weil, 2012/04/15
- [Qemu-devel] [PATCH 17/20] disas: Replace 'unsigned long' by 'uintptr_t',
Stefan Weil <=
- [Qemu-devel] [PATCH 07/20] w64: Fix definition of setjmp, Stefan Weil, 2012/04/15
- Re: [Qemu-devel] [PATCH 07/20] w64: Fix definition of setjmp, Blue Swirl, 2012/04/15
- Re: [Qemu-devel] [PATCH 07/20] w64: Fix definition of setjmp, Stefan Weil, 2012/04/15
- Re: [Qemu-devel] [PATCH 07/20] w64: Fix definition of setjmp, Blue Swirl, 2012/04/15
- Re: [Qemu-devel] [PATCH 07/20] w64: Fix definition of setjmp, Stefan Weil, 2012/04/15
- Re: [Qemu-devel] [PATCH 07/20] w64: Fix definition of setjmp, Blue Swirl, 2012/04/15
- Re: [Qemu-devel] [PATCH 07/20] w64: Fix definition of setjmp, Stefan Weil, 2012/04/15
[Qemu-devel] [PATCH 10/20] softmmu: Use uintptr_t for physaddr, Stefan Weil, 2012/04/15
[Qemu-devel] [PATCH 04/20] w64: Fix data types in cpu-all.h, exec.c, Stefan Weil, 2012/04/15