qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Crash due to invalid env->current_tb


From: Paul Brook
Subject: Re: [Qemu-devel] Crash due to invalid env->current_tb
Date: Sat, 3 May 2008 23:02:32 +0100
User-agent: KMail/1.9.9

> I made a new version that does not use T0 at all. Tested on i386 and
> AMD64, both Sparc32 and Sparc64 work. AMD64 asm version does not seem
> to be necessary.

I guess amd64 is currently working by luck rather than by design.

You're pushing a single word to the stack, which could cause issues with stack 
alignment. I suggest:

sub $12,%%esp
push %%ebp
call *%1
pop %%ebp
add $12,%%esp

Likewise for amd64 you want sub $8, %%rsp, etc.

> +                              :  "ebx", "ecx", "edx", "esi", "edi", "cc");

You also want to add "memory" here.

>  #else
> -                T0 = gen_func();
> +                next_tb = gen_func();

I'd just make this a #error. Other host are likely to need special 
consideration anyway.

Other than that, looks ok to me.

Paul




reply via email to

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