aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/openblas-fix-tests-i686.patch
blob: 3325546ea38bb3c06f41aa690c7abe57fb6e1810 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Fix a test failure on some i686 systems:

https://github.com/xianyi/OpenBLAS/issues/1575

This patch is a squashed version of these commits:

https://github.com/xianyi/OpenBLAS/pull/1583

diff --git a/kernel/x86/KERNEL.NEHALEM b/kernel/x86/KERNEL.NEHALEM
index 835520ef..65b03ae5 100644
--- a/kernel/x86/KERNEL.NEHALEM
+++ b/kernel/x86/KERNEL.NEHALEM
@@ -1,3 +1 @@
 include $(KERNELDIR)/KERNEL.PENRYN
-SSWAPKERNEL  = ../arm/swap.c
-DSWAPKERNEL  = ../arm/swap.c
diff --git a/kernel/x86/swap.S b/kernel/x86/swap.S
index 54b00b33..e30c2789 100644
--- a/kernel/x86/swap.S
+++ b/kernel/x86/swap.S
@@ -138,6 +138,14 @@
 /* INCX != 1 or INCY != 1 */
 
 .L14:
+	cmpl	$0, %ebx
+	jne	.L141
+	cmpl	$0, %ecx
+	jne	.L141
+/* INCX == 0 and INCY == 0 */
+	jmp	.L27
+
+.L141:
 	movl	%edx, %eax
 	sarl	$2,   %eax
 	jle	.L28