All of lore.kernel.org
 help / color / mirror / Atom feed
From: "罗勇刚(Yonggang Luo)" <luoyonggang@gmail.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: "Dino Papararo" <skizzato73@msn.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Programmingkid <programmingkidx@gmail.com>,
	"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	"Howard Spoelstra" <hsp.cat7@gmail.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: About hardfloat in ppc
Date: Sat, 2 May 2020 01:49:07 +0800	[thread overview]
Message-ID: <CAE2XoE-sSkTf4c0-C3KeMG+B_8MNXJ=+im3E1tuW-z9ffTNshQ@mail.gmail.com> (raw)
In-Reply-To: <851c309c-37f2-ea4a-b471-52bddde527c7@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 1858 bytes --]

On Sat, May 2, 2020 at 12:51 AM Richard Henderson <
richard.henderson@linaro.org> wrote:

> On 5/1/20 9:29 AM, 罗勇刚(Yonggang Luo) wrote:
> > On Fri, May 1, 2020 at 10:18 PM Richard Henderson <
> richard.henderson@linaro.org
> >     Step 1 is to rearrange the fp helpers to eliminate
> helper_reset_fpstatus().
> >     I've mentioned this before, that it's possible to leave the
> steady-state of
> >     env->fp_status.exception_flags == 0, so there's no need for a
> separate function
> >     call.  I suspect this is worth a decent speedup by itself.
> >
> > Hi Richard, what kinds of rearrange the fp need to be done? Can you give
> me a
> > more detailed example? I am still not get the idea.
>
> See target/openrisc, helper_update_fpcsr.
>
> This is like target/ppc helper_float_check_status, in that it is called
> after
> the primary fpu helper, after the fpu result is written back to the
> architectural register, to process fpu exceptions.
>
> Note that if get_float_exception_flags returns non-zero, we immediately
> reset
> them to zero.  Thus the exception flags are only ever non-zero in between
> the
> primary fpu operation and the update of the fpscr.
>
According to
```
void HELPER(update_fpcsr)(CPUOpenRISCState *env)
{
    int tmp = get_float_exception_flags(&env->fp_status);

    if (tmp) {
        set_float_exception_flags(0, &env->fp_status);
        tmp = ieee_ex_to_openrisc(tmp);
        if (tmp) {
            env->fpcsr |= tmp;
            if (env->fpcsr & FPCSR_FPEE) {
                helper_exception(env, EXCP_FPE);
            }
        }
    }
}
```
The openrisc also clearing the flags before each fp operation?

>
> Thus, no need for a separate helper_reset_fpstatus.
>
>
> r~
>


-- 
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

[-- Attachment #2: Type: text/html, Size: 2677 bytes --]

  reply	other threads:[~2020-05-01 17:53 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27  6:39 About hardfloat in ppc 罗勇刚(Yonggang Luo)
2020-04-27  9:42 ` Alex Bennée
2020-04-27 10:34   ` BALATON Zoltan
2020-04-27 11:10     ` Alex Bennée
2020-04-27 21:18       ` 罗勇刚(Yonggang Luo)
2020-04-28  8:36         ` Alex Bennée
2020-04-28 14:29           ` 罗勇刚(Yonggang Luo)
2020-04-29 10:17           ` R: " Dino Papararo
2020-04-29 10:31             ` Dino Papararo
2020-04-29 11:57             ` Alex Bennée
2020-04-29 12:33               ` 罗勇刚(Yonggang Luo)
2020-04-29 13:38                 ` Alex Bennée
2020-04-29 14:31               ` R: " Dino Papararo
2020-04-29 14:49                 ` Peter Maydell
2020-04-29 18:25                 ` R: " Alex Bennée
2020-04-30  0:20                   ` 罗勇刚(Yonggang Luo)
2020-04-30  2:18                     ` Richard Henderson
2020-04-30  7:26                       ` 罗勇刚(Yonggang Luo)
2020-04-30  8:11                         ` Alex Bennée
2020-04-30  8:13                       ` 罗勇刚(Yonggang Luo)
2020-04-30 15:35                         ` BALATON Zoltan
2020-04-30 16:34                           ` R: " Dino Papararo
2020-05-01  1:59                             ` Programmingkid
2020-05-01  2:21                               ` 罗勇刚(Yonggang Luo)
2020-05-01 11:58                                 ` BALATON Zoltan
2020-05-01 12:04                                   ` 罗勇刚(Yonggang Luo)
2020-05-01 13:10                                     ` Alex Bennée
2020-05-01 13:39                                       ` BALATON Zoltan
2020-05-01 14:01                                         ` Alex Bennée
2020-05-01 14:18                                       ` Richard Henderson
2020-05-01 16:25                                         ` 罗勇刚(Yonggang Luo)
2020-05-01 19:33                                           ` Alex Bennée
2020-05-01 16:29                                         ` 罗勇刚(Yonggang Luo)
2020-05-01 16:51                                           ` Richard Henderson
2020-05-01 17:49                                             ` 罗勇刚(Yonggang Luo) [this message]
2020-05-01 20:35                                               ` Richard Henderson
2020-04-29 23:12               ` R: " 罗勇刚(Yonggang Luo)
2020-04-30 15:16           ` BALATON Zoltan
2020-04-30 18:59             ` Alex Bennée
2020-04-30 20:17               ` BALATON Zoltan

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='CAE2XoE-sSkTf4c0-C3KeMG+B_8MNXJ=+im3E1tuW-z9ffTNshQ@mail.gmail.com' \
    --to=luoyonggang@gmail.com \
    --cc=alex.bennee@linaro.org \
    --cc=hsp.cat7@gmail.com \
    --cc=programmingkidx@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=skizzato73@msn.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.