mmx.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <?xml version="1.0" encoding="ISO8859-1"?>
  2. <fpdoc-descriptions>
  3. <!--
  4. $Id$
  5. This file is part of the FPC documentation.
  6. Copyright (C) 1997, by Michael Van Canneyt
  7. The FPC documentation is free text; you can redistribute it and/or
  8. modify it under the terms of the GNU Library General Public License as
  9. published by the Free Software Foundation; either version 2 of the
  10. License, or (at your option) any later version.
  11. The FPC Documentation is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. Library General Public License for more details.
  15. You should have received a copy of the GNU Library General Public
  16. License along with the FPC documentation; see the file COPYING.LIB. If not,
  17. write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  18. Boston, MA 02111-1307, USA.
  19. -->
  20. <package name="rtl">
  21. <module name="mmx">
  22. <short>Access to MMX processor functionality</short>
  23. <descr>
  24. This document describes the <file>MMX</file> unit. This unit allows you to use the
  25. <var>MMX</var> capabilities of the Free Pascal compiler. It was written by Florian
  26. Klaempfl for the <var>I386</var> processor. It should work on all platforms that
  27. use the Intel processor.
  28. </descr>
  29. <element name="tmmxshortint">
  30. <short>Array of shortints, 64 bits in size</short>
  31. </element>
  32. <element name="tmmxbyte">
  33. <short>Array of bytes, 64 bits in size</short>
  34. </element>
  35. <element name="tmmxword">
  36. <short>Array of words, 64 bits in size</short>
  37. </element>
  38. <element name="tmmxinteger">
  39. <short>Array of integers, 64 bits in size</short>
  40. </element>
  41. <element name="tmmxfixed">
  42. <short>Array of Fixed16, 64 bits in size</short>
  43. </element>
  44. <element name="tmmxlongint">
  45. <short>Array of longint, 64 bits in size</short>
  46. </element>
  47. <element name="tmmxcardinal">
  48. <short>Array of cardinals, 64 bits in size</short>
  49. </element>
  50. <element name="tmmxsingle">
  51. <short>Array of singles, 64 bits in size</short>
  52. </element>
  53. <element name="pmmxshortint">
  54. <short>Pointer to <link id="tmmxshortint"/> array type</short>
  55. </element>
  56. <element name="pmmxbyte">
  57. <short>Pointer to <link id="tmmxbyte"/> array type</short>
  58. </element>
  59. <element name="pmmxword">
  60. <short>Pointer to <link id="tmmxword"/> array type</short>
  61. </element>
  62. <element name="pmmxinteger">
  63. <short>Pointer to <link id="tmmxinteger"/> array type</short>
  64. </element>
  65. <element name="pmmxfixed">
  66. <short>Pointer to <link id="tmmxfixed"/> array type</short>
  67. </element>
  68. <element name="pmmxlongint">
  69. <short>Pointer to <link id="tmmxlongint"/> array type</short>
  70. </element>
  71. <element name="pmmxcardinal">
  72. <short>Pointer to <link id="tmmxcardinal"/> array type</short>
  73. </element>
  74. <element name="pmmxsingle">
  75. <short>Pointer to <link id="tmmxsingle"/> array type</short>
  76. </element>
  77. <element name="is_mmx_cpu">
  78. <short>Is the current processor equipped with a MMX capable CPU</short>
  79. <descr>
  80. The <var>is_mmx_cpu</var> initialized constant allows you to determine
  81. if the computer has <var>MMX</var> extensions. It is set correctly in
  82. the unit's initialization code.
  83. </descr>
  84. </element>
  85. <element name="is_amd_3d_cpu">
  86. <short>Is the current processor equipped with a AMD 3D CPU</short>
  87. <descr>
  88. The <var>is_amd_3d_cpu</var> initialized constant allows you to determine
  89. if the computer has the AMD 3D extensions. It is set correctly in
  90. the unit's initialization code.
  91. </descr>
  92. </element>
  93. <element name="is_amd_3d_mmx_cpu">
  94. <short>Is the current processor equipped with a AMD 3D MMX CPU</short>
  95. <descr>
  96. The <var>is_amd_3d_mmx_cpu</var> initialized constant allows you to determine
  97. if the computer has the AMD 3D MMX extensions. It is set correctly in
  98. the unit's initialization code.
  99. </descr>
  100. </element>
  101. <element name="is_amd_3d_dsp_cpu">
  102. <short>Is the current processor equipped with a AMD 3D DSP CPU</short>
  103. <descr>
  104. The <var>is_amd_3d_dsp_cpu</var> initialized constant allows you to determine
  105. if the computer has the AMD 3D DSP extensions. It is set correctly in
  106. the unit's initialization code.
  107. </descr>
  108. </element>
  109. <element name="is_sse_cpu">
  110. <short>Is the current processor equipped with a SSE CPU</short>
  111. <descr>
  112. The <var>is_sse_cpu</var> initialized constant allows you to determine
  113. if the computer has the SSE extensions. It is set correctly in
  114. the unit's initialization code.
  115. </descr>
  116. </element>
  117. <element name="is_sse2_cpu">
  118. <short>Is the current processor equipped with a SSE2 CPU</short>
  119. <descr>
  120. The <var>is_sse2_cpu</var> initialized constant allows you to determine
  121. if the computer has the SSE2 extensions. It is set correctly in
  122. the unit's initialization code.
  123. </descr>
  124. </element>
  125. <element name="Emms">
  126. <short>Reset floating point registers</short>
  127. <descr>
  128. <p>
  129. <var>Emms</var> sets all floating point registers to empty. This procedure must
  130. be called after you have used any <var>MMX</var> instructions, if you want to use
  131. floating point arithmetic. If you just want to move floating point data
  132. around, it isn't necessary to call this function, the compiler doesn't use
  133. the FPU registers when moving data. Only when doing calculations, you should
  134. use this function. The following code demonstrates this:
  135. </p>
  136. <code>
  137. Program MMXDemo;
  138. uses mmx;
  139. var
  140. d1 : double;
  141. a : array[0..10000] of double;
  142. i : longint;
  143. begin
  144. d1:=1.0;
  145. {$mmx+}
  146. { floating point data is used, but we do _no_ arithmetic }
  147. for i:=0 to 10000 do
  148. a[i]:=d2; { this is done with 64 bit moves }
  149. {$mmx-}
  150. emms; { clear fpu }
  151. { now we can do floating point arithmetic again }
  152. end.
  153. </code>
  154. </descr>
  155. <seealso>
  156. <link id="femms"/>
  157. </seealso>
  158. </element>
  159. <element name="femms">
  160. <short>Reset floating point registers - AMD version</short>
  161. <descr>
  162. <var>femms</var> executes the <var>femms</var> assembler instruction for AMD
  163. processors. it is not supported by all assemblers, hence it is coded as byte
  164. codes.
  165. </descr>
  166. <seealso>
  167. <link id="emms"/>
  168. </seealso>
  169. </element>
  170. </module>
  171. </package>
  172. </fpdoc-descriptions>