Skip to content

Commit 0c84ffe

Browse files
authored
Merge pull request #2881 from mattip/fninit
add fninit to reset fpu registers before assembler routines
2 parents cb4274e + 403eb51 commit 0c84ffe

27 files changed

+107
-0
lines changed

kernel/x86_64/amax.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@
5454

5555
PROLOGUE
5656
PROFCODE
57+
58+
#ifdef WINDOWS_ABI
59+
emms
60+
#endif
5761

5862
salq $BASE_SHIFT, INCX
5963

kernel/x86_64/asum.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@
4949

5050
PROLOGUE
5151
PROFCODE
52+
53+
#ifdef WINDOWS_ABI
54+
emms
55+
#endif
5256

5357
fldz
5458
testq M, M

kernel/x86_64/dot.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
PROLOGUE
5151
PROFCODE
5252

53+
#ifdef WINDOWS_ABI
54+
emms
55+
#endif
56+
5357
salq $BASE_SHIFT, INCX
5458
salq $BASE_SHIFT, INCY
5559

kernel/x86_64/iamax.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
PROLOGUE
6161
PROFCODE
6262

63+
#ifdef WINDOWS_ABI
64+
emms
65+
#endif
66+
6367
salq $BASE_SHIFT, INCX
6468

6569
fldz

kernel/x86_64/izamax.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
PROLOGUE
6161
PROFCODE
6262

63+
#ifdef WINDOWS_ABI
64+
emms
65+
#endif
66+
6367
salq $ZBASE_SHIFT, INCX
6468

6569
fldz

kernel/x86_64/nrm2.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
PROLOGUE
5151
PROFCODE
5252

53+
#ifdef WINDOWS_ABI
54+
emms
55+
#endif
56+
5357
fldz
5458
testq M, M
5559
jle .L999

kernel/x86_64/qconjg.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
PROLOGUE
4343
PROFCODE
4444

45+
#ifdef WINDOWS_ABI
46+
emms
47+
#endif
48+
4549
fldz
4650
FLD 1 * SIZE(ARG1)
4751
fsubrp %st, %st(1)

kernel/x86_64/qdot.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@
5858

5959
PROLOGUE
6060

61+
#ifdef WINDOWS_ABI
62+
emms
63+
#endif
64+
6165
pushl %edi
6266
pushl %esi
6367
pushl %ebx

kernel/x86_64/qgemm_kernel_2x2.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@
7474
PROLOGUE
7575
PROFCODE
7676

77+
#ifdef WINDOWS_ABI
78+
emms
79+
#endif
80+
7781
subq $STACKSIZE, %rsp
7882
movq %rbx, 0(%rsp)
7983
movq %rbp, 8(%rsp)

kernel/x86_64/qgemv_n.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@
7676
PROLOGUE
7777
PROFCODE
7878

79+
#ifdef WINDOWS_ABI
80+
emms
81+
#endif
82+
7983
subq $STACKSIZE, %rsp
8084
movq %rbx, 0(%rsp)
8185
movq %rbp, 8(%rsp)

0 commit comments

Comments
 (0)