Revision aba8e906508bfd21692f4546a66e30524e535e6f authored by Tony Kelman on 26 January 2016, 07:17:06 UTC, committed by Tony Kelman on 26 January 2016, 07:20:09 UTC
This reverts commit dfba26bde58b9b9fae66001b136c67391243c394. This is a detail of the out of tree builds which only exist on master. Any backport that relies on this was not resolved correctly for release-0.4.
1 parent 57fc0bc
openblas-win64.patch
commit 640cccc2b159dba6d99b9eea11b7f23f98d6c85d
Author: Zhang Xianyi <traits.zhang@gmail.com>
Date: Mon Nov 30 15:19:45 2015 -0600
Refs #697. Fixed gemv bug for Windows.
Thank matzeri's patch.
diff --git a/interface/gemv.c b/interface/gemv.c
index 0a222a6..97c68bf 100644
--- a/interface/gemv.c
+++ b/interface/gemv.c
@@ -37,6 +37,7 @@
/*********************************************************************/
#include <stdio.h>
+#include <assert.h>
#include "common.h"
#include "l1param.h"
#ifdef FUNCTION_PROFILE
@@ -224,13 +225,17 @@ void CNAME(enum CBLAS_ORDER order,
#ifdef ALIGNED_ACCESS
stack_alloc_size += 3;
#endif
- if(stack_alloc_size < 128)
+// if(stack_alloc_size < 128)
//dgemv_n.S require a 128 bytes buffer
- stack_alloc_size = 128;
+// increasing instead of capping 128
+// ABI STACK for windows 288 bytes
+ stack_alloc_size += 288 / sizeof(FLOAT) ;
if(stack_alloc_size > MAX_STACK_ALLOC / sizeof(FLOAT))
stack_alloc_size = 0;
+// stack overflow check
+ volatile double stack_check = 3.14159265358979323846;
FLOAT stack_buffer[stack_alloc_size];
buffer = stack_alloc_size ? stack_buffer : (FLOAT *)blas_memory_alloc(1);
// printf("stack_alloc_size=%d\n", stack_alloc_size);
@@ -265,6 +270,8 @@ void CNAME(enum CBLAS_ORDER order,
}
#endif
+// stack overflow check
+assert(stack_check==3.14159265358979323846);
#ifdef MAX_STACK_ALLOC
if(!stack_alloc_size){
diff --git a/exports/Makefile b/exports/Makefile
index 177e975..29a9ca8 100644
--- a/exports/Makefile
+++ b/exports/Makefile
@@ -96,9 +96,9 @@ libgoto_hpl.def : gensymbol
ifeq (, $(SYMBOLPREFIX)$(SYMBOLSUFFIX))
$(LIBDYNNAME) : ../$(LIBNAME) osx.def
else
-../$(LIBNAME).renamed : ../$(LIBNAME) objconv.def
- $(OBJCONV) @objconv.def ../$(LIBNAME) ../$(LIBNAME).renamed
-$(LIBDYNNAME) : ../$(LIBNAME).renamed osx.def
+../$(LIBNAME).osx.renamed : ../$(LIBNAME) objconv.def
+ $(OBJCONV) @objconv.def ../$(LIBNAME) ../$(LIBNAME).osx.renamed
+$(LIBDYNNAME) : ../$(LIBNAME).osx.renamed osx.def
endif
ifeq ($(NOFORTRAN), $(filter $(NOFORTRAN),1 2))
#only build without Fortran
@@ -220,7 +220,7 @@ linktest.c : gensymbol ../Makefile.system ../getarch.c
perl ./gensymbol linktest $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" > linktest.c
clean ::
- @rm -f *.def *.dylib __.SYMDEF*
+ @rm -f *.def *.dylib __.SYMDEF* *.renamed
include ../Makefile.tail
Computing file changes ...