> On 5 October 2015 at 12:21, Chen Gang <xili_gchen_5...@hotmail.com> wrote: >> +static float32 t_to_float32 (uint32_t a) >> +{ >> + CPU_FloatU r; >> + r.l = a; >> + return r.f; >> +} > > This appears to be reimplementing make_float32(). >
OK, thanks. >> + >> +static uint32_t float32_to_t(float32 a) >> +{ >> + CPU_FloatU r; >> + r.f = a; >> + return r.l; >> +} > > And this is just float32_val(). > OK, thanks. >> uint64_t helper_fsingle_add1(CPUTLGState *env, uint64_t rsrc, uint64_t rsrcb) >> { >> - FPUTLGState *fpu = &env->fpu; >> - return fsingle_calc(fpu, int64_to_float32(rsrc, &FP_STATUS), >> - int64_to_float32(rsrcb, &FP_STATUS), >> - float32_add); >> + return fsingle_calc(&env->fpu, t_to_float32((uint32_t)rsrc), >> + t_to_float32((uint32_t)rsrcb), float32_add); >> } > > Why is the helper for a single-precision operation taking a 64-bit > argument anyway? > Oh, the register are uint64_t, so I guess the input register value are 64-bit, too. Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed