qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Compilation on FC3 x86_64 host


From: Bob Deblier
Subject: [Qemu-devel] Compilation on FC3 x86_64 host
Date: Sat, 12 Feb 2005 15:24:44 +0100

Hi,

Since the availability of the gcc-3.4.3-17 compiler on rawhide, which
doesn't crash on qemu source code, I've tried compiling the latest CVS
update once more.

There seems to be a problem with dyngen generating strange output for
quite a few functions in i386-user/op.h; as an example I'll select
op_jmp_label:

> case INDEX_op_jmp_label: {
>     extern void op_jmp_label();
> extern char GOTO_LABEL_PARAM;
>     memcpy(gen_code_ptr, (void *)((char *)&op_jmp_label+0), 20);
>     *(uint32_t *)(gen_code_ptr + 12) = (long)(&GOTO_LABEL_PARAM) -
> (long)(gen_code_ptr + 12) + -4;
>     gen_code_ptr += 20;
> }
> break;

The cause for this seems to be a missing definition for GOTO_LABEL_PARAM
in dyngen-exec.h, which - assuming that the code is similar to i386 -
can be patched with:

diff -p -r1.20 dyngen-exec.h
*** dyngen-exec.h       26 Jan 2005 21:30:57 -0000      1.20
--- dyngen-exec.h       12 Feb 2005 14:17:39 -0000
*************** extern int __op_jmp0, __op_jmp1, __op_jm
*** 221,226 ****
--- 221,227 ----
  #endif
  #ifdef __x86_64__
  #define EXIT_TB() asm volatile ("ret")
+ #define GOTO_LABEL_PARAM(n) asm volatile ("jmp " ASM_NAME
(__op_gen_label) #n)
  #endif
  #ifdef __powerpc__
  #define EXIT_TB() asm volatile ("blr")

I haven't tested this fix yet, but it compiles the i386 targets. More
feedback will follow...

Sincerely,

Bob Deblier





reply via email to

[Prev in Thread] Current Thread [Next in Thread]