mirror of https://github.com/golang/go.git
cmd/dist: detect sse2 even with gccgo
Change-Id: Idfb20bfe130d9a54d9f5aae8eab8a34655d30610 Reviewed-on: https://go-review.googlesource.com/8865 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
41e9f8c4ed
commit
ce43e1fec8
|
|
@ -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 }
|
||||
|
|
|
|||
Loading…
Reference in New Issue