1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 12:24:19 +00:00

fixed AVX crash for mingw build

This commit is contained in:
orignal 2016-12-15 10:43:48 -05:00
parent 34df1b1646
commit 6913da7efa

View File

@ -404,17 +404,18 @@ namespace crypto
( (
"vmovups %[key], %%ymm0 \n" "vmovups %[key], %%ymm0 \n"
"vmovups %[ipad], %%ymm1 \n" "vmovups %[ipad], %%ymm1 \n"
"vmovups %%ymm1, 32%[buf] \n" "vmovups %%ymm1, 32(%[buf]) \n"
"vxorps %%ymm0, %%ymm1, %%ymm1 \n" "vxorps %%ymm0, %%ymm1, %%ymm1 \n"
"vmovups %%ymm1, %[buf] \n" "vmovups %%ymm1, (%[buf]) \n"
"vmovups %[opad], %%ymm1 \n" "vmovups %[opad], %%ymm1 \n"
"vmovups %%ymm1, 32%[hash] \n" "vmovups %%ymm1, 32(%[hash]) \n"
"vxorps %%ymm0, %%ymm1, %%ymm1 \n" "vxorps %%ymm0, %%ymm1, %%ymm1 \n"
"vmovups %%ymm1, %[hash] \n" "vmovups %%ymm1, (%[hash]) \n"
"vzeroall \n" // end of AVX "vzeroall \n" // end of AVX
"movups %%xmm0, 80%[hash] \n" // zero last 16 bytes "movups %%xmm0, 80(%[hash]) \n" // zero last 16 bytes
: [buf]"=m"(*buf), [hash]"=m"(*hash) :
: [key]"m"(*(const uint8_t *)key), [ipad]"m"(*ipads), [opad]"m"(*opads) : [key]"m"(*(const uint8_t *)key), [ipad]"m"(*ipads), [opad]"m"(*opads),
[buf]"r"(buf), [hash]"r"(hash)
: "memory", "%xmm0" // TODO: change to %ymm0 later : "memory", "%xmm0" // TODO: change to %ymm0 later
); );
#else #else