qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "陳韋任 (Wei-Ren Chen)" <chenwj@iis.sinica.edu.tw>
To: Feng Gao <gf91597@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Modified OpenRisc fpu exception
Date: Fri, 30 Nov 2012 22:59:37 +0800	[thread overview]
Message-ID: <20121130145937.GA24470@cs.nctu.edu.tw> (raw)
In-Reply-To: <1354259862-12602-1-git-send-email-gf91597@gmail.com>

> -void QEMU_NORETURN raise_exception(OpenRISCCPU *cpu, uint32_t excp)
> +void QEMU_NORETURN do_raise_exception_err(OpenRISCCPU *cpu,
> +                                          uint32_t exception,
> +                                          uintptr_t pc)
>  {
> -    cpu->env.exception_index = excp;
> +    TranslationBlock *tb;
> +
> +    /* openrisc cpu has fifteen exceptions */
> +    if (exception < 0xe)
> +        qemu_log("%s: %d\n", __func__, exception);
> +
> +    cpu->env.exception_index = exception;
> +
> +    if (pc) {
> +        /* now we have a real cpu fault */
> +        tb = tb_find_pc(pc);
> +        if (tb) {
> +            /* the PC is inside the translated code. It means that we have
> +               a virtual CPU fault */
> +            cpu_restore_state(tb, &cpu->env, pc);
> +        }
> +    }
> +
>      cpu_loop_exit(&cpu->env);
>  }
> +
> +void QEMU_NORETURN do_raise_exception(OpenRISCCPU *cpu,
> +                                      uint32_t exception,
> +                                      uintptr_t pc)
> +{
> +    do_raise_exception_err(cpu, exception, pc);
> +}

  Please change your subject into "[PATCH v2] ..." so that others will
notice this is a new version patch. See [1] for more detail. Also, you
still doesn't address v1's comment. Why you put both do_raise_exception_err
and do_raise_exception here? It's unnecessary to me.

Regards,
chenwj

[1] http://wiki.qemu.org/Contribute/SubmitAPatch

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj

  reply	other threads:[~2012-11-30 14:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30  7:17 [Qemu-devel] [PATCH] Modified OpenRisc fpu exception Feng Gao
2012-11-30 14:59 ` 陳韋任 (Wei-Ren Chen) [this message]
2012-11-30 15:03 ` Peter Maydell
2012-11-30 16:31   ` Andreas Färber
2012-12-01 22:42     ` 高高峰

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=20121130145937.GA24470@cs.nctu.edu.tw \
    --to=chenwj@iis.sinica.edu.tw \
    --cc=gf91597@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).