tcpu1.pp 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. { %cpu=x86_64,i386}
  2. uses
  3. cpu;
  4. begin
  5. write('CMOV support: ');
  6. if CMOVSupport then
  7. begin
  8. writeln('yes');
  9. asm
  10. cmov %eax,%eax
  11. fldz
  12. fldz
  13. fcmovb %st(1)
  14. fstpl %st(0)
  15. fstpl %st(0)
  16. end;
  17. end
  18. else
  19. writeln('no');
  20. write('AES support: ');
  21. if AESSupport then
  22. begin
  23. writeln('yes');
  24. asm
  25. pxor %xmm0,%xmm0
  26. aesenc %xmm0,%xmm0
  27. end;
  28. end
  29. else
  30. writeln('no');
  31. write('AVX support: ');
  32. if AVXSupport then
  33. begin
  34. writeln('yes');
  35. asm
  36. vpxor %xmm0,%xmm0,%xmm0
  37. end;
  38. end
  39. else
  40. writeln('no');
  41. write('AVX2 support: ');
  42. if AVX2Support then
  43. begin
  44. writeln('yes');
  45. asm
  46. vpxor %ymm0,%ymm0,%ymm0
  47. end;
  48. end
  49. else
  50. writeln('no');
  51. write('AVX512F support: ');
  52. if AVX512FSupport then
  53. begin
  54. writeln('yes');
  55. asm
  56. vpxor %ymm0,%ymm0,%ymm0
  57. vaddpd %zmm0,%zmm0,%zmm0
  58. end;
  59. end
  60. else
  61. writeln('no');
  62. write('AVX512VNNI support: ');
  63. if AVX512VNNISupport then
  64. begin
  65. writeln('yes');
  66. asm
  67. vpxor %ymm0,%ymm0,%ymm0
  68. vpdpbusd %zmm0,%zmm0,%zmm0
  69. end;
  70. end
  71. else
  72. writeln('no');
  73. write('AVX512BITALG support: ');
  74. if AVX512BITALGSupport then
  75. begin
  76. writeln('yes');
  77. asm
  78. vpxor %ymm0,%ymm0,%ymm0
  79. vpopcntb %zmm0,%zmm0
  80. end;
  81. end
  82. else
  83. writeln('no');
  84. write('AVX512VBMI support: ');
  85. if AVX512VBMISupport then
  86. begin
  87. writeln('yes');
  88. asm
  89. vpxor %ymm0,%ymm0,%ymm0
  90. vpermi2b %zmm0,%zmm0,%zmm0
  91. end;
  92. end
  93. else
  94. writeln('no');
  95. write('AVX512VBMI2 support: ');
  96. if AVX512VBMI2Support then
  97. begin
  98. writeln('yes');
  99. asm
  100. vpxor %ymm0,%ymm0,%ymm0
  101. vpexpandw %zmm0,%zmm0
  102. end;
  103. end
  104. else
  105. writeln('no');
  106. write('VAES support: ');
  107. if VAESSupport then
  108. begin
  109. writeln('yes');
  110. asm
  111. vpxor %ymm0,%ymm0,%ymm0
  112. vaesenc %ymm0,%ymm0,%ymm0
  113. end;
  114. end
  115. else
  116. writeln('no');
  117. write('FMA support: ');
  118. if FMASupport then
  119. begin
  120. writeln('yes');
  121. asm
  122. pxor %xmm0,%xmm0
  123. vfmadd132SS %xmm0,%xmm0,%xmm0
  124. end;
  125. end
  126. else
  127. writeln('no');
  128. write('SHA support: ');
  129. if SHASupport then
  130. begin
  131. writeln('yes');
  132. asm
  133. sha256rnds2 %xmm0,%xmm0
  134. end;
  135. end
  136. else
  137. writeln('no');
  138. write('LZCNT support: ');
  139. if LZCNTSupport then
  140. begin
  141. writeln('yes');
  142. asm
  143. lzcnt %eax,%eax
  144. end;
  145. end
  146. else
  147. writeln('no');
  148. write('ADX support: ');
  149. if ADXSupport then
  150. begin
  151. writeln('yes');
  152. asm
  153. adcx %eax,%eax
  154. end;
  155. end
  156. else
  157. writeln('no');
  158. write('RDSEED support: ');
  159. if RDSEEDSupport then
  160. begin
  161. writeln('yes');
  162. asm
  163. rdseed %eax
  164. end;
  165. end
  166. else
  167. writeln('no');
  168. end.