12#ifdef CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY
17#if defined(_ARCH_PWR9)
22extern const char PPC_POWER9_FNAME[] = __FILE__;
28#ifdef CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY
30 typedef void (*SigHandler)(int);
32 static jmp_buf s_jmpSIGILL;
33 static void SigIllHandler(
int)
35 longjmp(s_jmpSIGILL, 1);
40#if (CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64)
44#if defined(CRYPTOPP_NO_CPU_FEATURE_PROBES)
46#elif defined(CRYPTOPP_POWER9_AVAILABLE)
47# if defined(CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY)
50 volatile int result =
true;
52 volatile SigHandler oldHandler = signal(SIGILL, SigIllHandler);
53 if (oldHandler == SIG_ERR)
56 volatile sigset_t oldMask;
57 if (sigprocmask(0, NULLPTR, (sigset_t*)&oldMask))
60 if (setjmp(s_jmpSIGILL))
66#if CRYPTOPP_BIG_ENDIAN
67 __asm__ __volatile__ (
".byte 0x7c, 0x60, 0x05, 0xe6 \n" : : :
"r3");
69 __asm__ __volatile__ (
".byte 0xe6, 0x05, 0x60, 0x7c \n" : : :
"r3");
74 sigprocmask(SIG_SETMASK, (sigset_t*)&oldMask, NULLPTR);
75 signal(SIGILL, oldHandler);
91#if defined(CRYPTOPP_NO_CPU_FEATURE_PROBES)
94# if defined(CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY)
97 volatile int result =
true;
99 volatile SigHandler oldHandler = signal(SIGILL, SigIllHandler);
100 if (oldHandler == SIG_ERR)
103 volatile sigset_t oldMask;
104 if (sigprocmask(0, NULLPTR, (sigset_t*)&oldMask))
107 if (setjmp(s_jmpSIGILL))
113#if CRYPTOPP_BIG_ENDIAN
114 __asm__ __volatile__ (
".byte 0x7c, 0x60, 0x05, 0xe6 \n" : : :
"r3");
116 __asm__ __volatile__ (
".byte 0xe6, 0x05, 0x60, 0x7c \n" : : :
"r3");
121 sigprocmask(SIG_SETMASK, (sigset_t*)&oldMask, NULLPTR);
122 signal(SIGILL, oldHandler);
Library configuration file.
Crypto++ library namespace.
Support functions for PowerPC and vector operations.