qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Artyom Tarasenko <atar4qemu@googlemail.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: sparc: potentially incorrect if dynamic npc?
Date: Tue, 20 Apr 2010 18:55:00 +0200	[thread overview]
Message-ID: <s2ofb8d4f71004200955ma54d8162o226db4aa2365f484@mail.gmail.com> (raw)
In-Reply-To: <h2mf43fc5581004200911sa12eec7fh39ed4ac667df4442@mail.gmail.com>

2010/4/20 Blue Swirl <blauwirbel@gmail.com>:
> On 4/20/10, Artyom Tarasenko <atar4qemu@googlemail.com> 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	other threads:[~2010-04-20 16:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20 15:53 [Qemu-devel] sparc: potentially incorrect if dynamic npc? Artyom Tarasenko
2010-04-20 16:11 ` [Qemu-devel] " Blue Swirl
2010-04-20 16:55   ` Artyom Tarasenko [this message]
2010-04-20 17:07     ` Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s2ofb8d4f71004200955ma54d8162o226db4aa2365f484@mail.gmail.com \
    --to=atar4qemu@googlemail.com \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).