Re: About hardfloat in ppc

2020-05-01 Thread Richard Henderson
On 5/1/20 10:49 AM, 罗勇刚(Yonggang Luo) wrote: > > > On Sat, May 2, 2020 at 12:51 AM Richard Henderson > > wrote: > > On 5/1/20 9:29 AM, 罗勇刚(Yonggang Luo) wrote: > > On Fri, May 1, 2020 at 10:18 PM Richard Henderson > mailto:richard.hender...@lina

Re: About hardfloat in ppc

2020-05-01 Thread Alex Bennée
罗勇刚(Yonggang Luo) writes: > On Fri, May 1, 2020 at 10:18 PM Richard Henderson < > richard.hender...@linaro.org> wrote: > >> On 5/1/20 6:10 AM, Alex Bennée wrote: >> > >> > 罗勇刚(Yonggang Luo) writes: >> > >> >> On Fri, May 1, 2020 at 7:58 PM BALATON Zoltan >> wrote: >> >> >> >>> On Fri, 1 May 2

Re: About hardfloat in ppc

2020-05-01 Thread Yonggang Luo
On Sat, May 2, 2020 at 12:51 AM Richard Henderson < richard.hender...@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.hender...@linaro.org > > Step 1 is to rearrange the fp helpers to eliminate > helper_reset_fp

Re: About hardfloat in ppc

2020-05-01 Thread Richard Henderson
On 5/1/20 9:29 AM, 罗勇刚(Yonggang Luo) wrote: > On Fri, May 1, 2020 at 10:18 PM Richard Henderson > 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_

Re: About hardfloat in ppc

2020-05-01 Thread Yonggang Luo
On Fri, May 1, 2020 at 10:18 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 5/1/20 6:10 AM, Alex Bennée wrote: > > > > 罗勇刚(Yonggang Luo) writes: > > > >> On Fri, May 1, 2020 at 7:58 PM BALATON Zoltan > wrote: > >> > >>> On Fri, 1 May 2020, 罗勇刚(Yonggang Luo) wrote: > That's

Re: About hardfloat in ppc

2020-05-01 Thread Yonggang Luo
On Fri, May 1, 2020 at 10:18 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 5/1/20 6:10 AM, Alex Bennée wrote: > > > > 罗勇刚(Yonggang Luo) writes: > > > >> On Fri, May 1, 2020 at 7:58 PM BALATON Zoltan > wrote: > >> > >>> On Fri, 1 May 2020, 罗勇刚(Yonggang Luo) wrote: > That's

Re: About hardfloat in ppc

2020-05-01 Thread Richard Henderson
On 5/1/20 6:10 AM, Alex Bennée wrote: > > 罗勇刚(Yonggang Luo) writes: > >> On Fri, May 1, 2020 at 7:58 PM BALATON Zoltan wrote: >> >>> On Fri, 1 May 2020, 罗勇刚(Yonggang Luo) wrote: That's what I suggested, We preserve a float computing cache typedef struct FpRecord { uint8_t

Re: About hardfloat in ppc

2020-05-01 Thread Alex Bennée
BALATON Zoltan writes: > On Fri, 1 May 2020, Alex Bennée wrote: >> 罗勇刚(Yonggang Luo) writes: >>> On Fri, May 1, 2020 at 7:58 PM BALATON Zoltan wrote: On Fri, 1 May 2020, 罗勇刚(Yonggang Luo) wrote: > That's what I suggested, > We preserve a float computing cache > typedef struc

Re: About hardfloat in ppc

2020-05-01 Thread BALATON Zoltan
On Fri, 1 May 2020, Alex Bennée wrote: 罗勇刚(Yonggang Luo) writes: On Fri, May 1, 2020 at 7:58 PM BALATON Zoltan wrote: On Fri, 1 May 2020, 罗勇刚(Yonggang Luo) wrote: That's what I suggested, We preserve a float computing cache typedef struct FpRecord { uint8_t op; float32 A; float32 B; } F

Re: About hardfloat in ppc

2020-05-01 Thread Alex Bennée
罗勇刚(Yonggang Luo) writes: > On Fri, May 1, 2020 at 7:58 PM BALATON Zoltan wrote: > >> On Fri, 1 May 2020, 罗勇刚(Yonggang Luo) wrote: >> > That's what I suggested, >> > We preserve a float computing cache >> > typedef struct FpRecord { >> > uint8_t op; >> > float32 A; >> > float32 B; >> > }

Re: About hardfloat in ppc

2020-05-01 Thread Yonggang Luo
On Fri, May 1, 2020 at 7:58 PM BALATON Zoltan wrote: > On Fri, 1 May 2020, 罗勇刚(Yonggang Luo) wrote: > > That's what I suggested, > > We preserve a float computing cache > > typedef struct FpRecord { > > uint8_t op; > > float32 A; > > float32 B; > > } FpRecord; > > FpRecord fp_cache[1024]; >

Re: About hardfloat in ppc

2020-05-01 Thread BALATON Zoltan
On Fri, 1 May 2020, 罗勇刚(Yonggang Luo) wrote: That's what I suggested, We preserve a float computing cache typedef struct FpRecord { uint8_t op; float32 A; float32 B; } FpRecord; FpRecord fp_cache[1024]; int fp_cache_length; uint32_t fp_exceptions; 1. For each new fp operation we push it to

Re: About hardfloat in ppc

2020-04-30 Thread Yonggang Luo
ammingk...@gmail.com>; qemu-...@nongnu.org; Howard Spoelstra < > hsp.c...@gmail.com>; Alex Bennée > > Oggetto: Re: R: R: About hardfloat in ppc > > > > On Thu, 30 Apr 2020, 罗勇刚(Yonggang Luo) wrote: > >> I propose a new way to computing the float flags, We preser

Re: About hardfloat in ppc

2020-04-30 Thread Programmingkid
iginale- > Da: BALATON Zoltan > Inviato: giovedì 30 aprile 2020 17:36 > A: 罗勇刚(Yonggang Luo) > Cc: Richard Henderson ; Dino Papararo > ; qemu-devel@nongnu.org; Programmingkid > ; qemu-...@nongnu.org; Howard Spoelstra > ; Alex Bennée > Oggetto: Re: R: R: About hardfloat

Re: About hardfloat in ppc

2020-04-30 Thread BALATON Zoltan
On Thu, 30 Apr 2020, Alex Bennée wrote: BALATON Zoltan writes: On Tue, 28 Apr 2020, Alex Bennée wrote: 罗勇刚(Yonggang Luo) writes: I am confusing why only inexact are set then we can use hard-float. The inexact behaviour of the host hardware may be different from the guest architecture we

Re: About hardfloat in ppc

2020-04-30 Thread Alex Bennée
BALATON Zoltan writes: > On Tue, 28 Apr 2020, Alex Bennée wrote: >> 罗勇刚(Yonggang Luo) writes: >>> I am confusing why only inexact are set then we can use hard-float. >> >> The inexact behaviour of the host hardware may be different from the >> guest architecture we are trying to emulate and

R: R: R: About hardfloat in ppc

2020-04-30 Thread Dino Papararo
@nongnu.org; Programmingkid ; qemu-...@nongnu.org; Howard Spoelstra ; Alex Bennée Oggetto: Re: R: R: About hardfloat in ppc On Thu, 30 Apr 2020, 罗勇刚(Yonggang Luo) wrote: > I propose a new way to computing the float flags, We preserve a float > computing cash typedef struct FpRecord { uint

Re: R: R: About hardfloat in ppc

2020-04-30 Thread BALATON Zoltan
On Thu, 30 Apr 2020, 罗勇刚(Yonggang Luo) wrote: I propose a new way to computing the float flags, We preserve a float computing cash typedef struct FpRecord { uint8_t op; float32 A; float32 B; } FpRecord; FpRecord fp_cache[1024]; int fp_cache_length; uint32_t fp_exceptions; 1. For each new fp

Re: About hardfloat in ppc

2020-04-30 Thread BALATON Zoltan
On Tue, 28 Apr 2020, Alex Bennée wrote: 罗勇刚(Yonggang Luo) writes: I am confusing why only inexact are set then we can use hard-float. The inexact behaviour of the host hardware may be different from the guest architecture we are trying to emulate and the host hardware may not be configurabl

Re: R: R: About hardfloat in ppc

2020-04-30 Thread Yonggang Luo
I propose a new way to computing the float flags, We preserve a float computing cash typedef struct FpRecord { uint8_t op; float32 A; float32 B; } FpRecord; FpRecord fp_cache[1024]; int fp_cache_length; uint32_t fp_exceptions; 1. For each new fp operation we push it to the fp_cache, 2. On

Re: R: R: About hardfloat in ppc

2020-04-30 Thread Alex Bennée
罗勇刚(Yonggang Luo) writes: > On Thu, Apr 30, 2020 at 10:18 AM Richard Henderson < > richard.hender...@linaro.org> wrote: > >> On 4/29/20 5:20 PM, 罗勇刚(Yonggang Luo) wrote: >> > Question, in hard-float, if we don't want to read the fp register. >> > for example: If we wanna compute c = a + b in fp

Re: R: R: About hardfloat in ppc

2020-04-30 Thread Yonggang Luo
On Thu, Apr 30, 2020 at 10:18 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 4/29/20 5:20 PM, 罗勇刚(Yonggang Luo) wrote: > > Question, in hard-float, if we don't want to read the fp register. > > for example: If we wanna compute c = a + b in fp32 > > if c = a + b In hard float > >

Re: R: R: About hardfloat in ppc

2020-04-29 Thread Richard Henderson
On 4/29/20 5:20 PM, 罗勇刚(Yonggang Luo) wrote: > Question, in hard-float, if we don't want to read the fp register. > for example: If we wanna compute c = a + b in fp32 > if c = a + b In hard float > and if b1 = c - a in hard float > if b1 != b at bitwise level, the we se the inexat to 1, otherwsie 

Re: R: R: About hardfloat in ppc

2020-04-29 Thread Yonggang Luo
Question, in hard-float, if we don't want to read the fp register. for example: If we wanna compute c = a + b in fp32 if c = a + b In hard float and if b1 = c - a in hard float if b1 != b at bitwise level, the we se the inexat to 1, otherwsie we set inexat bit to 0? are this valid? we can also do

Re: R: About hardfloat in ppc

2020-04-29 Thread Yonggang Luo
an use the > hardfloat path when we know we are using normal numbers. > > > > > A little of documentation here: > http://mirror.informatimago.com/next/developer.apple.com/documentation/mac/PPCNumerics/PPCNumerics-154.html > > > > Regards, > > Dino Papararo > > > > ---

Re: R: R: About hardfloat in ppc

2020-04-29 Thread Alex Bennée
Dino Papararo writes: > Hi Alex, > > I leave to you TCG's experts how it works and how to implement it, I'm > only tryng to explain a possible fast way to go (if ever possible) 😊 This is all a theoretical discussion unless someone cares enough to improve the situation. While I have an interes

Re: R: About hardfloat in ppc

2020-04-29 Thread Peter Maydell
On Wed, 29 Apr 2020 at 15:33, Dino Papararo wrote: > > Hi Alex, > maybe a pseudo code can show better what I mean > > if (ppc_fpu_instruction == USE_FPSCR) /* instruction have dot '.' so FPSCR > will be updated and we need have care about it */ > soft_decode (ppc_fpu_instruction) > else

R: R: About hardfloat in ppc

2020-04-29 Thread Dino Papararo
bers. > > A little of documentation here: > http://mirror.informatimago.com/next/developer.apple.com/documentation > /mac/PPCNumerics/PPCNumerics-154.html > > Regards, > Dino Papararo > > -Messaggio originale- > Da: Qemu-devel Per > conto di Alex Bennée >

Re: R: About hardfloat in ppc

2020-04-29 Thread Alex Bennée
罗勇刚(Yonggang Luo) writes: > On Wed, Apr 29, 2020 at 7:57 PM Alex Bennée wrote: > >> >> Dino Papararo writes: >> >> > Hello, >> > about handling of PPC fpu exceptions and Hard Floats support we could >> consider a different approach for different instructions. >> > i.e. not all fpu instruction

Re: R: About hardfloat in ppc

2020-04-29 Thread Yonggang Luo
when we know we are using normal numbers. > > > > > A little of documentation here: > http://mirror.informatimago.com/next/developer.apple.com/documentation/mac/PPCNumerics/PPCNumerics-154.html > > > > Regards, > > Dino Papararo > > > > -Messaggio

Re: R: About hardfloat in ppc

2020-04-29 Thread Alex Bennée
/next/developer.apple.com/documentation/mac/PPCNumerics/PPCNumerics-154.html > > Regards, > Dino Papararo > > -Messaggio originale- > Da: Qemu-devel Per conto > di Alex Bennée > Inviato: martedì 28 aprile 2020 10:37 > A: luoyongg...@gmail.com > Cc: qemu-.

R: About hardfloat in ppc

2020-04-29 Thread Dino Papararo
an ; Mark Cave-Ayland ; Programmingkid ; Howard Spoelstra Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org Oggetto: R: About hardfloat in ppc Hello, about handling of PPC fpu exceptions and Hard Floats support we could consider a different approach for different instructions. i.e. not all fpu in

R: About hardfloat in ppc

2020-04-29 Thread Dino Papararo
o di Alex Bennée Inviato: martedì 28 aprile 2020 10:37 A: luoyongg...@gmail.com Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org Oggetto: Re: About hardfloat in ppc 罗勇刚(Yonggang Luo) writes: > I am confusing why only inexact are set then we can use hard-float. The inexact behaviour of the

Re: About hardfloat in ppc

2020-04-28 Thread Yonggang Luo
On Tue, Apr 28, 2020 at 4:36 PM Alex Bennée wrote: > > 罗勇刚(Yonggang Luo) writes: > > > I am confusing why only inexact are set then we can use hard-float. > > The inexact behaviour of the host hardware may be different from the > guest architecture we are trying to emulate and the host hardwar

Re: About hardfloat in ppc

2020-04-28 Thread Alex Bennée
罗勇刚(Yonggang Luo) writes: > I am confusing why only inexact are set then we can use hard-float. The inexact behaviour of the host hardware may be different from the guest architecture we are trying to emulate and the host hardware may not be configurable to emulate the guest mode. Have a lo

Re: About hardfloat in ppc

2020-04-27 Thread Yonggang Luo
I am confusing why only inexact are set then we can use hard-float. And PPC always clearing inexact flag before calling to soft-float funcitons. so we can not optimize it with hard-float. I need some resouces about ineact flag and why always clearing inexcat in PPC FP simualtion. I am looking fo

Re: About hardfloat in ppc

2020-04-27 Thread Alex Bennée
BALATON Zoltan writes: > On Mon, 27 Apr 2020, Alex Bennée wrote: >> 罗勇刚(Yonggang Luo) writes: >>> Because ppc fpu-helper are always clearing float_flag_inexact, >>> So is that possible to optimize the performance when float_flag_inexact >>> are cleared? >> >> There was some discussion about t

Re: About hardfloat in ppc

2020-04-27 Thread BALATON Zoltan
On Mon, 27 Apr 2020, Alex Bennée wrote: 罗勇刚(Yonggang Luo) writes: Because ppc fpu-helper are always clearing float_flag_inexact, So is that possible to optimize the performance when float_flag_inexact are cleared? There was some discussion about this in the last thread about enabling hardflo

Re: About hardfloat in ppc

2020-04-27 Thread Alex Bennée
罗勇刚(Yonggang Luo) writes: > Because ppc fpu-helper are always clearing float_flag_inexact, > So is that possible to optimize the performance when float_flag_inexact > are cleared? There was some discussion about this in the last thread about enabling hardfloat for PPC. See the thread: Subj

About hardfloat in ppc

2020-04-26 Thread Yonggang Luo
Because ppc fpu-helper are always clearing float_flag_inexact, So is that possible to optimize the performance when float_flag_inexact are cleared? -- 此致 礼 罗勇刚 Yours sincerely, Yonggang Luo