fix DNRM2 returning INF instead of zero due to intermediate overflow
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Tue, 19 Jul 2022 08:19:27 +0000 (10:19 +0200)
committerGitHub <noreply@github.com>
Tue, 19 Jul 2022 08:19:27 +0000 (10:19 +0200)
kernel/sparc/dnrm2.S

index 04810f6..cf75229 100644 (file)
        FMUL    fmax, c1, c1
 
 .LL99:
+#ifdef DOUBLE
+       set 0x000010C6F7A0B5ED8, %g1
+
+       st %g1,  [%fp-8]
+       ld [%fp-8], a8
+       FCMP    %fcc0, a8, fmax
+       fmovdg  %fcc0, fzero, c1
+#endif
        return  %i7 + 8
        clr     %g0