qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: sparc: potentially incorrect if dynamic npc?


From: Artyom Tarasenko
Subject: [Qemu-devel] Re: sparc: potentially incorrect if dynamic npc?
Date: Tue, 20 Apr 2010 18:55:00 +0200

2010/4/20 Blue Swirl <address@hidden>:
> On 4/20/10, Artyom Tarasenko <address@hidden> wrote:
>> /* XXX: potentially incorrect if dynamic npc */
>>  static void do_branch
>>
>>  There are few comments like this in target-sparc/translate.c .
>>  In what case is it incorrect?
>>
>>  Can do_branch functions be called with dynamic npc?
>
> Maybe, if there are two branches or jumps in a row. The last time I
> checked, at least for successive branches we do the correct thing.
> It's pretty obscure, no compiler will generate such sequences and
> nobody with asm skills either.

Why not? That's how you can implement a very compact 'case'
operator in asm. It is used in OBP.

But you are right, this seems to work (at least with ss-5 and
ss-20 OBP).

> Another corner case that IIRC we don't handle is where a jump
> instruction is at the end of the page and its delay slot instruction
> is at next page.

Do you mean that npc is dynamic in this case, or that if
npc is dynamic and the instruction is at the end of the page we have
a problem?

> I think one commit for Microblaze added support for
> this case.

-- 
Regards,
Artyom Tarasenko

solaris/sparc under qemu blog: http://tyom.blogspot.com/




reply via email to

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