aboutsummaryrefslogtreecommitdiff
path: root/dyngen.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-08-10 21:38:48 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-08-10 21:38:48 +0000
commitabcd5da72e66becf055aff3a225f7c8645c18fff (patch)
treea572a2d498771dd22f4cb518baf02c47df0c2df9 /dyngen.c
parent97a847bc03d22bf5b0562af2407bc3516b3bfdd1 (diff)
use bswap.h
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@351 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'dyngen.c')
-rw-r--r--dyngen.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/dyngen.c b/dyngen.c
index 762ee9d566..df88dc2cc8 100644
--- a/dyngen.c
+++ b/dyngen.c
@@ -25,7 +25,7 @@
#include <unistd.h>
#include <fcntl.h>
-#include "config.h"
+#include "config-host.h"
/* elf format definitions. We use these macros to test the CPU to
allow cross compilation (this tool must be ran on the build
@@ -108,8 +108,7 @@ typedef uint64_t host_ulong;
#define SHT_RELOC SHT_REL
#endif
-#define NO_THUNK_TYPE_SIZE
-#include "thunk.h"
+#include "bswap.h"
enum {
OUT_GEN_OP,
@@ -648,7 +647,7 @@ void gen_code(const char *name, host_ulong offset, host_ulong size,
{
ElfW(Sym) *sym;
const char *sym_name, *p;
- target_ulong val;
+ unsigned long val;
int n;
for(i = 0, sym = symtab; i < nb_syms; i++, sym++) {
@@ -663,7 +662,7 @@ void gen_code(const char *name, host_ulong offset, host_ulong size,
if (!ptr)
error("__op_labelN in invalid section");
offset = sym->st_value;
- val = *(target_ulong *)(ptr + offset);
+ val = *(unsigned long *)(ptr + offset);
#ifdef ELF_USES_RELOCA
{
int reloc_shndx, nb_relocs1, j;
@@ -687,7 +686,7 @@ void gen_code(const char *name, host_ulong offset, host_ulong size,
if (val >= start_offset && val < start_offset + copy_size) {
n = strtol(p, NULL, 10);
- fprintf(outfile, " label_offsets[%d] = %d + (gen_code_ptr - gen_code_buf);\n", n, val - start_offset);
+ fprintf(outfile, " label_offsets[%d] = %ld + (gen_code_ptr - gen_code_buf);\n", n, val - start_offset);
}
}
}