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: 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
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 instructions take care about inexact or exceptions

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
..@nongnu.org; qemu-devel@nongnu.org Oggetto: Re: R: About hardfloat in ppc 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 instructions take care about ine

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
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 instructions take care about inexact or exceptions

Re: R: About hardfloat in ppc

2020-04-29 Thread Alex Bennée
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 instructions take care about inexact or exceptions bits: if > I take a simple fadd f0,f1,f2 I'll copy value der

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
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 instructions take care about inexact or exceptions bits: if I take a simple fadd f0,f1,f2 I'll copy value derived from adding f1+f2 into f1 regi