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.

134 satır
7.2KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <title>Libgcc (GNU Compiler Collection (GCC) Internals)</title>
  21. <meta name="description" content="Libgcc (GNU Compiler Collection (GCC) Internals)">
  22. <meta name="keywords" content="Libgcc (GNU Compiler Collection (GCC) Internals)">
  23. <meta name="resource-type" content="document">
  24. <meta name="distribution" content="global">
  25. <meta name="Generator" content="makeinfo">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="index.html#Top" rel="up" title="Top">
  30. <link href="Integer-library-routines.html#Integer-library-routines" rel="next" title="Integer library routines">
  31. <link href="Interface.html#Interface" rel="prev" title="Interface">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.indentedblock {margin-right: 0em}
  36. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  37. blockquote.smallquotation {font-size: smaller}
  38. div.display {margin-left: 3.2em}
  39. div.example {margin-left: 3.2em}
  40. div.lisp {margin-left: 3.2em}
  41. div.smalldisplay {margin-left: 3.2em}
  42. div.smallexample {margin-left: 3.2em}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style: oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nolinebreak {white-space: nowrap}
  54. span.roman {font-family: initial; font-weight: normal}
  55. span.sansserif {font-family: sans-serif; font-weight: normal}
  56. ul.no-bullet {list-style: none}
  57. -->
  58. </style>
  59. </head>
  60. <body lang="en">
  61. <a name="Libgcc"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="Languages.html#Languages" accesskey="n" rel="next">Languages</a>, Previous: <a href="Interface.html#Interface" accesskey="p" rel="prev">Interface</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  65. </div>
  66. <hr>
  67. <a name="The-GCC-low_002dlevel-runtime-library"></a>
  68. <h2 class="chapter">4 The GCC low-level runtime library</h2>
  69. <p>GCC provides a low-level runtime library, <samp>libgcc.a</samp> or
  70. <samp>libgcc_s.so.1</samp> on some platforms. GCC generates calls to
  71. routines in this library automatically, whenever it needs to perform
  72. some operation that is too complicated to emit inline code for.
  73. </p>
  74. <p>Most of the routines in <code>libgcc</code> handle arithmetic operations
  75. that the target processor cannot perform directly. This includes
  76. integer multiply and divide on some machines, and all floating-point
  77. and fixed-point operations on other machines. <code>libgcc</code> also includes
  78. routines for exception handling, and a handful of miscellaneous operations.
  79. </p>
  80. <p>Some of these routines can be defined in mostly machine-independent C.
  81. Others must be hand-written in assembly language for each processor
  82. that needs them.
  83. </p>
  84. <p>GCC will also generate calls to C library routines, such as
  85. <code>memcpy</code> and <code>memset</code>, in some cases. The set of routines
  86. that GCC may possibly use is documented in <a href="http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#Other-Builtins">Other
  87. Builtins</a> in <cite>Using the GNU Compiler Collection (GCC)</cite>.
  88. </p>
  89. <p>These routines take arguments and return values of a specific machine
  90. mode, not a specific C type. See <a href="Machine-Modes.html#Machine-Modes">Machine Modes</a>, for an explanation
  91. of this concept. For illustrative purposes, in this chapter the
  92. floating point type <code>float</code> is assumed to correspond to <code>SFmode</code>;
  93. <code>double</code> to <code>DFmode</code>; and <code>long&nbsp;double<!-- /@w --></code> to both
  94. <code>TFmode</code> and <code>XFmode</code>. Similarly, the integer types <code>int</code>
  95. and <code>unsigned&nbsp;int<!-- /@w --></code> correspond to <code>SImode</code>; <code>long</code> and
  96. <code>unsigned&nbsp;long<!-- /@w --></code> to <code>DImode</code>; and <code>long&nbsp;long<!-- /@w --></code> and
  97. <code>unsigned&nbsp;long&nbsp;long<!-- /@w --></code> to <code>TImode</code>.
  98. </p>
  99. <table class="menu" border="0" cellspacing="0">
  100. <tr><td align="left" valign="top">&bull; <a href="Integer-library-routines.html#Integer-library-routines" accesskey="1">Integer library routines</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  101. </td></tr>
  102. <tr><td align="left" valign="top">&bull; <a href="Soft-float-library-routines.html#Soft-float-library-routines" accesskey="2">Soft float library routines</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  103. </td></tr>
  104. <tr><td align="left" valign="top">&bull; <a href="Decimal-float-library-routines.html#Decimal-float-library-routines" accesskey="3">Decimal float library routines</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  105. </td></tr>
  106. <tr><td align="left" valign="top">&bull; <a href="Fixed_002dpoint-fractional-library-routines.html#Fixed_002dpoint-fractional-library-routines" accesskey="4">Fixed-point fractional library routines</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  107. </td></tr>
  108. <tr><td align="left" valign="top">&bull; <a href="Exception-handling-routines.html#Exception-handling-routines" accesskey="5">Exception handling routines</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  109. </td></tr>
  110. <tr><td align="left" valign="top">&bull; <a href="Miscellaneous-routines.html#Miscellaneous-routines" accesskey="6">Miscellaneous routines</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  111. </td></tr>
  112. </table>
  113. <hr>
  114. <div class="header">
  115. <p>
  116. Next: <a href="Languages.html#Languages" accesskey="n" rel="next">Languages</a>, Previous: <a href="Interface.html#Interface" accesskey="p" rel="prev">Interface</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  117. </div>
  118. </body>
  119. </html>