You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

133 lines
6.7KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- This file documents the GNU Assembler "as".
  4. Copyright (C) 1991-2020 Free Software Foundation, Inc.
  5. Permission is granted to copy, distribute and/or modify this document
  6. under the terms of the GNU Free Documentation License, Version 1.3
  7. or any later version published by the Free Software Foundation;
  8. with no Invariant Sections, with no Front-Cover Texts, and with no
  9. Back-Cover Texts. A copy of the license is included in the
  10. section entitled "GNU Free Documentation License".
  11. -->
  12. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  13. <head>
  14. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  15. <title>i386-Float (Using as)</title>
  16. <meta name="description" content="i386-Float (Using as)">
  17. <meta name="keywords" content="i386-Float (Using as)">
  18. <meta name="resource-type" content="document">
  19. <meta name="distribution" content="global">
  20. <meta name="Generator" content="makeinfo">
  21. <link href="index.html#Top" rel="start" title="Top">
  22. <link href="AS-Index.html#AS-Index" rel="index" title="AS Index">
  23. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  24. <link href="i386_002dDependent.html#i386_002dDependent" rel="up" title="i386-Dependent">
  25. <link href="i386_002dSIMD.html#i386_002dSIMD" rel="next" title="i386-SIMD">
  26. <link href="i386_002dJumps.html#i386_002dJumps" rel="prev" title="i386-Jumps">
  27. <style type="text/css">
  28. <!--
  29. a.summary-letter {text-decoration: none}
  30. blockquote.indentedblock {margin-right: 0em}
  31. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  32. blockquote.smallquotation {font-size: smaller}
  33. div.display {margin-left: 3.2em}
  34. div.example {margin-left: 3.2em}
  35. div.lisp {margin-left: 3.2em}
  36. div.smalldisplay {margin-left: 3.2em}
  37. div.smallexample {margin-left: 3.2em}
  38. div.smalllisp {margin-left: 3.2em}
  39. kbd {font-style: oblique}
  40. pre.display {font-family: inherit}
  41. pre.format {font-family: inherit}
  42. pre.menu-comment {font-family: serif}
  43. pre.menu-preformatted {font-family: serif}
  44. pre.smalldisplay {font-family: inherit; font-size: smaller}
  45. pre.smallexample {font-size: smaller}
  46. pre.smallformat {font-family: inherit; font-size: smaller}
  47. pre.smalllisp {font-size: smaller}
  48. span.nolinebreak {white-space: nowrap}
  49. span.roman {font-family: initial; font-weight: normal}
  50. span.sansserif {font-family: sans-serif; font-weight: normal}
  51. ul.no-bullet {list-style: none}
  52. -->
  53. </style>
  54. </head>
  55. <body lang="en">
  56. <a name="i386_002dFloat"></a>
  57. <div class="header">
  58. <p>
  59. Next: <a href="i386_002dSIMD.html#i386_002dSIMD" accesskey="n" rel="next">i386-SIMD</a>, Previous: <a href="i386_002dJumps.html#i386_002dJumps" accesskey="p" rel="prev">i386-Jumps</a>, Up: <a href="i386_002dDependent.html#i386_002dDependent" accesskey="u" rel="up">i386-Dependent</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
  60. </div>
  61. <hr>
  62. <a name="Floating-Point-7"></a>
  63. <h4 class="subsection">9.16.9 Floating Point</h4>
  64. <a name="index-i386-floating-point"></a>
  65. <a name="index-floating-point_002c-i386"></a>
  66. <a name="index-x86_002d64-floating-point"></a>
  67. <a name="index-floating-point_002c-x86_002d64"></a>
  68. <p>All 80387 floating point types except packed BCD are supported.
  69. (BCD support may be added without much difficulty). These data
  70. types are 16-, 32-, and 64- bit integers, and single (32-bit),
  71. double (64-bit), and extended (80-bit) precision floating point.
  72. Each supported type has an instruction mnemonic suffix and a constructor
  73. associated with it. Instruction mnemonic suffixes specify the operand&rsquo;s
  74. data type. Constructors build these data types into memory.
  75. </p>
  76. <a name="index-float-directive_002c-i386"></a>
  77. <a name="index-single-directive_002c-i386"></a>
  78. <a name="index-double-directive_002c-i386"></a>
  79. <a name="index-tfloat-directive_002c-i386"></a>
  80. <a name="index-float-directive_002c-x86_002d64"></a>
  81. <a name="index-single-directive_002c-x86_002d64"></a>
  82. <a name="index-double-directive_002c-x86_002d64"></a>
  83. <a name="index-tfloat-directive_002c-x86_002d64"></a>
  84. <ul>
  85. <li> Floating point constructors are &lsquo;<samp>.float</samp>&rsquo; or &lsquo;<samp>.single</samp>&rsquo;,
  86. &lsquo;<samp>.double</samp>&rsquo;, and &lsquo;<samp>.tfloat</samp>&rsquo; for 32-, 64-, and 80-bit formats.
  87. These correspond to instruction mnemonic suffixes &lsquo;<samp>s</samp>&rsquo;, &lsquo;<samp>l</samp>&rsquo;,
  88. and &lsquo;<samp>t</samp>&rsquo;. &lsquo;<samp>t</samp>&rsquo; stands for 80-bit (ten byte) real. The 80387
  89. only supports this format via the &lsquo;<samp>fldt</samp>&rsquo; (load 80-bit real to stack
  90. top) and &lsquo;<samp>fstpt</samp>&rsquo; (store 80-bit real and pop stack) instructions.
  91. </li><li> <a name="index-word-directive_002c-i386"></a>
  92. <a name="index-long-directive_002c-i386"></a>
  93. <a name="index-int-directive_002c-i386"></a>
  94. <a name="index-quad-directive_002c-i386"></a>
  95. <a name="index-word-directive_002c-x86_002d64"></a>
  96. <a name="index-long-directive_002c-x86_002d64"></a>
  97. <a name="index-int-directive_002c-x86_002d64"></a>
  98. <a name="index-quad-directive_002c-x86_002d64"></a>
  99. Integer constructors are &lsquo;<samp>.word</samp>&rsquo;, &lsquo;<samp>.long</samp>&rsquo; or &lsquo;<samp>.int</samp>&rsquo;, and
  100. &lsquo;<samp>.quad</samp>&rsquo; for the 16-, 32-, and 64-bit integer formats. The
  101. corresponding instruction mnemonic suffixes are &lsquo;<samp>s</samp>&rsquo; (single),
  102. &lsquo;<samp>l</samp>&rsquo; (long), and &lsquo;<samp>q</samp>&rsquo; (quad). As with the 80-bit real format,
  103. the 64-bit &lsquo;<samp>q</samp>&rsquo; format is only present in the &lsquo;<samp>fildq</samp>&rsquo; (load
  104. quad integer to stack top) and &lsquo;<samp>fistpq</samp>&rsquo; (store quad integer and pop
  105. stack) instructions.
  106. </li></ul>
  107. <p>Register to register operations should not use instruction mnemonic suffixes.
  108. &lsquo;<samp>fstl %st, %st(1)</samp>&rsquo; will give a warning, and be assembled as if you
  109. wrote &lsquo;<samp>fst %st, %st(1)</samp>&rsquo;, since all register to register operations
  110. use 80-bit floating point operands. (Contrast this with &lsquo;<samp>fstl %st, mem</samp>&rsquo;,
  111. which converts &lsquo;<samp>%st</samp>&rsquo; from 80-bit to 64-bit floating point format,
  112. then stores the result in the 4 byte location &lsquo;<samp>mem</samp>&rsquo;)
  113. </p>
  114. <hr>
  115. <div class="header">
  116. <p>
  117. Next: <a href="i386_002dSIMD.html#i386_002dSIMD" accesskey="n" rel="next">i386-SIMD</a>, Previous: <a href="i386_002dJumps.html#i386_002dJumps" accesskey="p" rel="prev">i386-Jumps</a>, Up: <a href="i386_002dDependent.html#i386_002dDependent" accesskey="u" rel="up">i386-Dependent</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
  118. </div>
  119. </body>
  120. </html>