Commit ce43e1fe authored by Shenghou Ma's avatar Shenghou Ma Committed by Minux Ma

cmd/dist: detect sse2 even with gccgo

Change-Id: Idfb20bfe130d9a54d9f5aae8eab8a34655d30610
Reviewed-on: https://go-review.googlesource.com/8865Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 41e9f8c4
......@@ -6,4 +6,15 @@
package main
func cansse2() bool { return false }
/*
int supports_sse2() {
#if defined(__i386__) || defined(__x86_64__)
return __builtin_cpu_supports("sse2");
#else
return 0;
#endif
}
*/
import "C"
func cansse2() bool { return C.supports_sse2() != 0 }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment