# define SPARCV9_VIS3 (1<<6)
# define SPARCV9_RANDOM (1<<7)
# define SPARCV9_64BIT_STACK (1<<8)
+# define SPARCV9_FJAESX (1<<9)/* Fujitsu SPARC64 X AES */
/*
* OPENSSL_sparcv9cap_P[1] is copy of Compatibility Feature Register,
.type _sparcv9_random,#function
.size _sparcv9_random,.-_sparcv9_vis3_probe
+.global _sparcv9_fjaesx_probe
+.align 8
+_sparcv9_fjaesx_probe:
+ .word 0x81b09206 !faesencx %f2,%f6,%f0
+ retl
+ nop
+.size _sparcv9_fjaesx_probe,.-_sparcv9_fjaesx_probe
+
.global OPENSSL_cleanse
.align 32
OPENSSL_cleanse:
unsigned int vec[1];
if (getisax (vec,1)) {
- if (vec[0]&0x0020) OPENSSL_sparcv9cap_P[0] |= SPARCV9_VIS1;
- if (vec[0]&0x0040) OPENSSL_sparcv9cap_P[0] |= SPARCV9_VIS2;
- if (vec[0]&0x0080) OPENSSL_sparcv9cap_P[0] |= SPARCV9_BLK;
- if (vec[0]&0x0100) OPENSSL_sparcv9cap_P[0] |= SPARCV9_FMADD;
- if (vec[0]&0x0400) OPENSSL_sparcv9cap_P[0] |= SPARCV9_VIS3;
+ if (vec[0]&0x0020) OPENSSL_sparcv9cap_P[0] |= SPARCV9_VIS1;
+ if (vec[0]&0x0040) OPENSSL_sparcv9cap_P[0] |= SPARCV9_VIS2;
+ if (vec[0]&0x0080) OPENSSL_sparcv9cap_P[0] |= SPARCV9_BLK;
+ if (vec[0]&0x0100) OPENSSL_sparcv9cap_P[0] |= SPARCV9_FMADD;
+ if (vec[0]&0x0400) OPENSSL_sparcv9cap_P[0] |= SPARCV9_VIS3;
+ if (vec[0]&0x10000) OPENSSL_sparcv9cap_P[0] |= SPARCV9_FJAESX;
/* reconstruct %cfr copy */
OPENSSL_sparcv9cap_P[1] = (vec[0]>>17)&0x3ff;
OPENSSL_sparcv9cap_P[0] |= SPARCV9_VIS3;
}
+ if (sigsetjmp(common_jmp, 1) == 0) {
+ _sparcv9_fjaesx_probe();
+ OPENSSL_sparcv9cap_P[0] |= SPARCV9_FJAESX;
+ }
+
/*
* In wait for better solution _sparcv9_rdcfr is masked by
* VIS3 flag, because it goes to uninterruptable endless