This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
AI开发
Register
Sign In
OSchip
/
OpenBLAS
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
66
Wiki
evaluate
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
HPC
Browse Source
Fix DNRM2 returning INF instead of zero due to intermediate overflow
tags/v0.3.21
Martin Kroeker
GitHub
3 years ago
parent
c43ec53bdd
commit
6c118b7977
No known key found for this signature in database
GPG Key ID:
4AEE18F83AFDEB23
1 changed files
with
29 additions
and
4 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+29
-4
kernel/power/nrm2.S
+ 29
- 4
kernel/power/nrm2.S
View File
@@ -50,8 +50,8 @@
#define FZERO 144(SP)
#define FONE 148(SP)
#define FMAX 152(SP)
#define STACKSIZE 16
0
#define FINF 160(SP)
#define STACKSIZE 16
8
PROLOGUE
PROFCODE
@@ -87,6 +87,16 @@
stw r10, FZERO
stw r11, FONE
stw r12, FMAX
#ifdef DOUBLE
lis r12, 0x7ff0
ori r12, r12, 0x0
sldi r12, r12, 32
oris r12, r12,0x0
ori r12, r12, 0x0
std r12, FINF
#endif
stw r10, 4 + FMAX
lfs f1, FZERO
@@ -334,10 +344,17 @@ LL(100):
lfs f0, FONE
fcmpu cr0, f1, f31
nop
beq- cr0, LL(9999)
fdiv f30, f0, f31
#ifdef DOUBLE
lfd f1, FINF
fcmpu cr0, f1, f30
lfs f1, FZERO
beq- cr0, LL(9999)
#endif
fmr f0, f1
fmr f2, f1
fmr f3, f1
@@ -712,9 +729,16 @@ LL(1999):
fcmpu cr0, f1, f31
beq- cr0, LL(9999)
fdiv f30, f0, f31
#ifdef DOUBLE
lfd f1, FINF
fcmpu cr0, f1, f30
lfs f1, FZERO
beq- cr0, LL(9999)
#endif
fmr f0, f1
fmr f2, f1
fmr f3, f1
@@ -875,6 +899,7 @@ LL(2170):
fadd f0, f0, f4
fsqrt f0, f0
fmul f1, f31, f0
.align 4
Write
Preview
Loading…
Cancel
Save