From 5f846be2e4a83f380eb41773d1493c637b0d5cd3 Mon Sep 17 00:00:00 2001 From: Mike Nolta Date: Tue, 2 Dec 2014 20:47:40 -0500 Subject: [PATCH 1/3] fix fortran compiler detection on FreeBSD On FreeBSD, passing extra options to `which` causes it to report a non-zero status: ``` $ which gfortran48 -m64 /usr/local/bin/gfortran48 $ echo $? 1 ``` ``` $ which gfortran48 /usr/local/bin/gfortran48 $ echo $? 0 ``` --- f_check | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/f_check b/f_check index 90ae2fe97..5719faff1 100644 --- a/f_check +++ b/f_check @@ -16,6 +16,7 @@ $config = shift(@ARGV); $nofortran = 0; $compiler = join(" ", @ARGV); +$compiler_bin = shift(@ARGV); # f77 is too ambiguous $compiler = "" if $compiler eq "f77"; @@ -53,7 +54,7 @@ if ($compiler eq "") { } else { - $data = `which $compiler > /dev/null 2> /dev/null`; + $data = `which $compiler_bin > /dev/null 2> /dev/null`; $vendor = ""; if (!$?) { @@ -204,7 +205,7 @@ if ($compiler eq "") { } } -$data = `which $compiler > /dev/null 2> /dev/null`; +$data = `which $compiler_bin > /dev/null 2> /dev/null`; if (!$?) { From 271ceb8baea76c29139c7e610d1c5126507a13ca Mon Sep 17 00:00:00 2001 From: Mike Nolta Date: Tue, 2 Dec 2014 21:23:23 -0500 Subject: [PATCH 2/3] c_check: set $hostarch to x86_64 instead of amd64 `uname -m` returns "amd64" on some systems. --- c_check | 1 + 1 file changed, 1 insertion(+) diff --git a/c_check b/c_check index 94b0bf36e..c4aa2d420 100644 --- a/c_check +++ b/c_check @@ -3,6 +3,7 @@ # Checking cross compile $hostos = `uname -s | sed -e s/\-.*//`; chop($hostos); $hostarch = `uname -m | sed -e s/i.86/x86/`;chop($hostarch); +$hostarch = "x86_64" if ($hostarch eq "amd64"); $binary = $ENV{"BINARY"}; From 0cf29ba6d2862234161ee98ff82cb63fece4d110 Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Wed, 3 Dec 2014 17:38:41 +0800 Subject: [PATCH 3/3] Fixed a bug of sgemm sandy bridge kernel. Reported by Julia project. JuliaLang/julia#9084 --- kernel/x86_64/sgemm_kernel_16x4_sandy.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/x86_64/sgemm_kernel_16x4_sandy.S b/kernel/x86_64/sgemm_kernel_16x4_sandy.S index e6c4126b9..77c7e2f50 100644 --- a/kernel/x86_64/sgemm_kernel_16x4_sandy.S +++ b/kernel/x86_64/sgemm_kernel_16x4_sandy.S @@ -726,8 +726,8 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #if !defined(TRMMKERNEL) - vaddps (CO1), %xmm4,%xmm4 - vaddps 1 * SIZE(CO1), %xmm5,%xmm5 + vaddss (CO1), %xmm4,%xmm4 + vaddss 1 * SIZE(CO1), %xmm5,%xmm5 #endif @@ -756,7 +756,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #if !defined(TRMMKERNEL) - vaddps (CO1), %xmm4,%xmm4 + vaddss (CO1), %xmm4,%xmm4 #endif