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: 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

R: R: About hardfloat in ppc

2020-04-29 Thread Dino Papararo
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 /* instruction have not dot '.' and FPSCR will be never updated a