Use Windows EOL conventions
parent
69a00192b9
commit
926e91008b
|
|
@ -1,6 +1,6 @@
|
||||||
#include <arm_acle.h>
|
#include <arm_acle.h>
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
#include <arm_neon.h>
|
#include <arm_neon.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
// test_acle.h determines if this is available. Then,
|
// test_acle.h determines if this is available. Then,
|
||||||
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
|
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
|
||||||
// if the ACLE header is not available.
|
// if the ACLE header is not available.
|
||||||
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
|
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
|
||||||
# include <arm_acle.h>
|
# include <arm_acle.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
uint8x16_t x;
|
uint8x16_t x;
|
||||||
x=vaeseq_u8(x,x);
|
x=vaeseq_u8(x,x);
|
||||||
x=vaesmcq_u8(x);
|
x=vaesmcq_u8(x);
|
||||||
x=vaesdq_u8(x,x);
|
x=vaesdq_u8(x,x);
|
||||||
x=vaesimcq_u8(x);
|
x=vaesimcq_u8(x);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
#include <arm_neon.h>
|
#include <arm_neon.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
// test_acle.h determines if this is available. Then,
|
// test_acle.h determines if this is available. Then,
|
||||||
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
|
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
|
||||||
// if the ACLE header is not available.
|
// if the ACLE header is not available.
|
||||||
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
|
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
|
||||||
# include <arm_acle.h>
|
# include <arm_acle.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
uint32x4_t x;
|
uint32x4_t x;
|
||||||
x=veorq_u32(x,x);
|
x=veorq_u32(x,x);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,23 @@
|
||||||
#include <arm_neon.h>
|
#include <arm_neon.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
// test_acle.h determines if this is available. Then,
|
// test_acle.h determines if this is available. Then,
|
||||||
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
|
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
|
||||||
// if the ACLE header is not available.
|
// if the ACLE header is not available.
|
||||||
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
|
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
|
||||||
# include <arm_acle.h>
|
# include <arm_acle.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
uint32_t w=0xffffffff;
|
uint32_t w=0xffffffff;
|
||||||
|
|
||||||
w = __crc32w(w,w);
|
w = __crc32w(w,w);
|
||||||
w = __crc32h(w,w);
|
w = __crc32h(w,w);
|
||||||
w = __crc32b(w,w);
|
w = __crc32b(w,w);
|
||||||
w = __crc32cw(w,w);
|
w = __crc32cw(w,w);
|
||||||
w = __crc32ch(w,w);
|
w = __crc32ch(w,w);
|
||||||
w = __crc32cb(w,w);
|
w = __crc32cb(w,w);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#include <arm_neon.h>
|
#include <arm_neon.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
uint32x4_t x;
|
uint32x4_t x;
|
||||||
x=veorq_u32(x,x);
|
x=veorq_u32(x,x);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,22 @@
|
||||||
#include <arm_neon.h>
|
#include <arm_neon.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
// test_acle.h determines if this is available. Then,
|
// test_acle.h determines if this is available. Then,
|
||||||
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
|
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
|
||||||
// if the ACLE header is not available.
|
// if the ACLE header is not available.
|
||||||
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
|
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
|
||||||
# include <arm_acle.h>
|
# include <arm_acle.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
const poly64_t a=0x60606060, b=0x90909090, c=0xb0b0b0b0;
|
const poly64_t a=0x60606060, b=0x90909090, c=0xb0b0b0b0;
|
||||||
const poly64x2_t d={0x60606060,0x90909090};
|
const poly64x2_t d={0x60606060,0x90909090};
|
||||||
const poly8x16_t e={0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
|
const poly8x16_t e={0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
|
||||||
0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0};
|
0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0};
|
||||||
|
|
||||||
const poly128_t r1 = vmull_p64(a, b);
|
const poly128_t r1 = vmull_p64(a, b);
|
||||||
const poly128_t r2 = vmull_high_p64(d, d);
|
const poly128_t r2 = vmull_high_p64(d, d);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
#include <arm_neon.h>
|
#include <arm_neon.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
// test_acle.h determines if this is available. Then,
|
// test_acle.h determines if this is available. Then,
|
||||||
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
|
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
|
||||||
// if the ACLE header is not available.
|
// if the ACLE header is not available.
|
||||||
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
|
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
|
||||||
# include <arm_acle.h>
|
# include <arm_acle.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
uint32x4_t y;
|
uint32x4_t y;
|
||||||
y=vsha1cq_u32(y,0,y);
|
y=vsha1cq_u32(y,0,y);
|
||||||
y=vsha1mq_u32(y,1,y);
|
y=vsha1mq_u32(y,1,y);
|
||||||
y=vsha1pq_u32(y,2,y);
|
y=vsha1pq_u32(y,2,y);
|
||||||
y = vsha256hq_u32(y, y, y);
|
y = vsha256hq_u32(y, y, y);
|
||||||
y = vsha256h2q_u32(y, y, y);
|
y = vsha256h2q_u32(y, y, y);
|
||||||
y = vsha256su1q_u32(y, y, y);
|
y = vsha256su1q_u32(y, y, y);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,29 @@
|
||||||
#include <arm_neon.h>
|
#include <arm_neon.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
// test_acle.h determines if this is available. Then,
|
// test_acle.h determines if this is available. Then,
|
||||||
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
|
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
|
||||||
// if the ACLE header is not available.
|
// if the ACLE header is not available.
|
||||||
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
|
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
|
||||||
# include <arm_acle.h>
|
# include <arm_acle.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
// SM4 block cipher
|
// SM4 block cipher
|
||||||
uint32x4_t x;
|
uint32x4_t x;
|
||||||
x=vsm4ekeyq_u32(x,x);
|
x=vsm4ekeyq_u32(x,x);
|
||||||
x=vsm4eq_u32(x,x);
|
x=vsm4eq_u32(x,x);
|
||||||
|
|
||||||
// SM3 hash
|
// SM3 hash
|
||||||
uint32x4_t y;
|
uint32x4_t y;
|
||||||
y=vsm3ss1q_u32(x,y,y);
|
y=vsm3ss1q_u32(x,y,y);
|
||||||
y=vsm3tt1aq_u32(x,y,y,3);
|
y=vsm3tt1aq_u32(x,y,y,3);
|
||||||
y=vsm3tt1bq_u32(x,y,y,1);
|
y=vsm3tt1bq_u32(x,y,y,1);
|
||||||
y=vsm3tt2aq_u32(x,y,y,2);
|
y=vsm3tt2aq_u32(x,y,y,2);
|
||||||
y=vsm3tt2bq_u32(x,y,y,3);
|
y=vsm3tt2bq_u32(x,y,y,3);
|
||||||
y=vsm3partw1q_u32(x,y,y);
|
y=vsm3partw1q_u32(x,y,y);
|
||||||
y=vsm3partw2q_u32(x,y,y);
|
y=vsm3partw2q_u32(x,y,y);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
uint32_t x=0;
|
uint32_t x=0;
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#include <altivec.h>
|
#include <altivec.h>
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
__vector unsigned char x;
|
__vector unsigned char x;
|
||||||
x=vec_ld(0, (unsigned char*)argv[0]);
|
x=vec_ld(0, (unsigned char*)argv[0]);
|
||||||
x=vec_add(x,x);
|
x=vec_add(x,x);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
#include <altivec.h>
|
#include <altivec.h>
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
__vector unsigned int z;
|
__vector unsigned int z;
|
||||||
#if defined(__xlc__) || defined(__xlC__) || defined(__clang__)
|
#if defined(__xlc__) || defined(__xlC__) || defined(__clang__)
|
||||||
__vector unsigned char x;
|
__vector unsigned char x;
|
||||||
x=vec_xl(0, (unsigned char*)argv[0]);
|
x=vec_xl(0, (unsigned char*)argv[0]);
|
||||||
x=vec_add(x,x);
|
x=vec_add(x,x);
|
||||||
#else
|
#else
|
||||||
__vector unsigned char x;
|
__vector unsigned char x;
|
||||||
x=vec_vsx_ld(0, (unsigned char*)argv[0]);
|
x=vec_vsx_ld(0, (unsigned char*)argv[0]);
|
||||||
x=vec_add(x,x);
|
x=vec_add(x,x);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
#include <altivec.h>
|
#include <altivec.h>
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
__vector unsigned long long z;
|
__vector unsigned long long z;
|
||||||
#if defined(__xlc__) || defined(__xlC__) || defined(__clang__)
|
#if defined(__xlc__) || defined(__xlC__) || defined(__clang__)
|
||||||
__vector unsigned char x;
|
__vector unsigned char x;
|
||||||
x=__vcipher(x,x);
|
x=__vcipher(x,x);
|
||||||
x=__vcipherlast(x,x);
|
x=__vcipherlast(x,x);
|
||||||
x=__vncipher(x,x);
|
x=__vncipher(x,x);
|
||||||
x=__vncipherlast(x,x);
|
x=__vncipherlast(x,x);
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
__vector unsigned long long x;
|
__vector unsigned long long x;
|
||||||
x=__builtin_crypto_vcipher(x,x);
|
x=__builtin_crypto_vcipher(x,x);
|
||||||
x=__builtin_crypto_vcipherlast(x,x);
|
x=__builtin_crypto_vcipherlast(x,x);
|
||||||
x=__builtin_crypto_vncipher(x,x);
|
x=__builtin_crypto_vncipher(x,x);
|
||||||
x=__builtin_crypto_vncipherlast(x,x);
|
x=__builtin_crypto_vncipherlast(x,x);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
void* function(void *ptr)
|
void* function(void *ptr)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
pthread_t thread;
|
pthread_t thread;
|
||||||
int ret = pthread_create(&thread, NULL, function, (void*)0);
|
int ret = pthread_create(&thread, NULL, function, (void*)0);
|
||||||
pthread_join(thread, NULL);
|
pthread_join(thread, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
#include <wmmintrin.h>
|
#include <wmmintrin.h>
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
__m128i x;
|
__m128i x;
|
||||||
x=_mm_aesenc_si128(x,x);
|
x=_mm_aesenc_si128(x,x);
|
||||||
x=_mm_aesenclast_si128(x,x);
|
x=_mm_aesenclast_si128(x,x);
|
||||||
x=_mm_aesdec_si128(x,x);
|
x=_mm_aesdec_si128(x,x);
|
||||||
x=_mm_aesdeclast_si128(x,x);
|
x=_mm_aesdeclast_si128(x,x);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
__m256d x;
|
__m256d x;
|
||||||
x=_mm256_addsub_pd(x,x);
|
x=_mm256_addsub_pd(x,x);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
__m256i x;
|
__m256i x;
|
||||||
x=_mm256_add_epi64 (x,x);
|
x=_mm256_add_epi64 (x,x);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <wmmintrin.h>
|
#include <wmmintrin.h>
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
__m128i x;
|
__m128i x;
|
||||||
x=_mm_clmulepi64_si128(x,x,0x11);
|
x=_mm_clmulepi64_si128(x,x,0x11);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
uint32_t a, b, c, d;
|
uint32_t a, b, c, d;
|
||||||
asm volatile ( "cpuid" : "+a"(a), "=b"(b), "+c"(c), "=d"(d) );
|
asm volatile ( "cpuid" : "+a"(a), "=b"(b), "+c"(c), "=d"(d) );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
__m128i x;
|
__m128i x;
|
||||||
x=_mm_sha1msg1_epu32(x,x);
|
x=_mm_sha1msg1_epu32(x,x);
|
||||||
x=_mm_sha1msg2_epu32(x,x);
|
x=_mm_sha1msg2_epu32(x,x);
|
||||||
x=_mm_sha1nexte_epu32(x,x);
|
x=_mm_sha1nexte_epu32(x,x);
|
||||||
x=_mm_sha1rnds4_epu32(x,x,0);
|
x=_mm_sha1rnds4_epu32(x,x,0);
|
||||||
x=_mm_sha256msg1_epu32(x,x);
|
x=_mm_sha256msg1_epu32(x,x);
|
||||||
x=_mm_sha256msg2_epu32(x,x);
|
x=_mm_sha256msg2_epu32(x,x);
|
||||||
x=_mm_sha256rnds2_epu32(x,x,x);
|
x=_mm_sha256rnds2_epu32(x,x,x);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <emmintrin.h>
|
#include <emmintrin.h>
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
__m128i x;
|
__m128i x;
|
||||||
x=_mm_add_epi64(x,x);
|
x=_mm_add_epi64(x,x);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <pmmintrin.h>
|
#include <pmmintrin.h>
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
__m128d x;
|
__m128d x;
|
||||||
x=_mm_addsub_pd(x,x);
|
x=_mm_addsub_pd(x,x);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <smmintrin.h>
|
#include <smmintrin.h>
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
__m128i x, a, b;
|
__m128i x, a, b;
|
||||||
x=_mm_blend_epi16(a,b,4);
|
x=_mm_blend_epi16(a,b,4);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <nmmintrin.h>
|
#include <nmmintrin.h>
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
unsigned int x=32;
|
unsigned int x=32;
|
||||||
x=_mm_crc32_u8(x,4);
|
x=_mm_crc32_u8(x,4);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <tmmintrin.h>
|
#include <tmmintrin.h>
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
__m128i x;
|
__m128i x;
|
||||||
x=_mm_alignr_epi8(x,x,2);
|
x=_mm_alignr_epi8(x,x,2);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue