Hi mjt, After discussing with Peter, I did further debugging. The original code is harmless even with the wrong bit position placement. My patch is not perfect and Peter suggested refactoring those snippets. Cheers On Sun, Mar 22, 2026 at 2:20 PM Michael Tokarev wrote: > On 26.12.2025 09:42, Li-Hang Lin wrote: > > Fix an error in rsqrte_f64() where the sign bit was being > > placed incorrectly. Specifically, ensure f64_sign is deposited > > into bit 63. > > > > Additionally, update the comments regarding the exponent (exp) bit > > width to reflect the correct double-precision specifications. > > Ping? Or is this patch not needed anymore? > > Thanks, > > /mjt > > > target/arm/tcg/vfp_helper.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/target/arm/tcg/vfp_helper.c b/target/arm/tcg/vfp_helper.c > > index e156e3774a..60188b2c7e 100644 > > --- a/target/arm/tcg/vfp_helper.c > > +++ b/target/arm/tcg/vfp_helper.c > > @@ -1078,8 +1078,8 @@ float64 HELPER(rsqrte_f64)(float64 input, > float_status *s) > > > > f64_frac = recip_sqrt_estimate(&f64_exp, 3068, f64_frac, false); > > > > - /* result = sign : result_exp<4:0> : estimate<7:0> : Zeros(44) */ > > - val = deposit64(0, 61, 1, f64_sign); > > + /* result = sign : result_exp<10:0> : estimate<7:0> : Zeros(44) */ > > + val = deposit64(0, 63, 1, f64_sign); > > val = deposit64(val, 52, 11, f64_exp); > > val = deposit64(val, 44, 8, extract64(f64_frac, 52 - 8, 8)); > > return make_float64(val); > >