aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/aeshash.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2017-01-03 20:41:54 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-01-03 20:41:54 +0000
commitb379f8d81f6141336c8585b19f9703bc26b99e2a (patch)
treee91a764a7f1c84b2581d2ad59d2e3c768e807937 /libgo/runtime/aeshash.c
parentd4eff95b5795146476524ee1d558323ca98eb292 (diff)
downloadgcc-b379f8d81f6141336c8585b19f9703bc26b99e2a.zip
gcc-b379f8d81f6141336c8585b19f9703bc26b99e2a.tar.gz
gcc-b379f8d81f6141336c8585b19f9703bc26b99e2a.tar.bz2
re PR go/78789 (Error: no such instruction: `aesenc %xmm0,%xmm2' when compiling libgo/runtime/aeshash.c)
PR go/78789 runtime: don't build aeshash.c if the assembler doesn't support it This is for CentOS 5, whose assembler does not know the aesinc instruction. Fixes GCC PR 78789. Patch by Uros Bizjak. Reviewed-on: https://go-review.googlesource.com/34796 From-SVN: r244031
Diffstat (limited to 'libgo/runtime/aeshash.c')
-rw-r--r--libgo/runtime/aeshash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgo/runtime/aeshash.c b/libgo/runtime/aeshash.c
index bdfea5f..7f29baa 100644
--- a/libgo/runtime/aeshash.c
+++ b/libgo/runtime/aeshash.c
@@ -12,7 +12,7 @@ uintptr aeshashbody(void*, uintptr, uintptr, Slice)
uintptr aeshashbody(void*, uintptr, uintptr, Slice)
__attribute__((no_split_stack));
-#if defined(__i386__) || defined(__x86_64__)
+#if (defined(__i386__) || defined(__x86_64__)) && defined(HAVE_AS_X86_AES)
#include <emmintrin.h>
#include <tmmintrin.h>
@@ -573,7 +573,7 @@ uintptr aeshashbody(void* p, uintptr seed, uintptr size, Slice aeskeysched) {
#endif // !defined(__x86_64__)
-#else // !defined(__i386__) && !defined(__x86_64__)
+#else // !defined(__i386__) && !defined(__x86_64__) || !defined(HAVE_AS_X86_AES)
uintptr aeshashbody(void* p __attribute__((unused)),
uintptr seed __attribute__((unused)),
@@ -583,4 +583,4 @@ uintptr aeshashbody(void* p __attribute__((unused)),
runtime_throw("impossible call to aeshashbody");
}
-#endif // !defined(__i386__) && !defined(__x86_64__)
+#endif // !defined(__i386__) && !defined(__x86_64__) || !defined(HAVE_AS_X86_AES)