You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
4.9 KiB
HTML
96 lines
4.9 KiB
HTML
4 years ago
|
<html lang="en">
|
||
|
<head>
|
||
|
<title>Libgcc - GNU Compiler Collection (GCC) Internals</title>
|
||
|
<meta http-equiv="Content-Type" content="text/html">
|
||
|
<meta name="description" content="GNU Compiler Collection (GCC) Internals">
|
||
|
<meta name="generator" content="makeinfo 4.13">
|
||
|
<link title="Top" rel="start" href="index.html#Top">
|
||
|
<link rel="prev" href="Interface.html#Interface" title="Interface">
|
||
|
<link rel="next" href="Languages.html#Languages" title="Languages">
|
||
|
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||
|
<!--
|
||
|
Copyright (C) 1988-2015 Free Software Foundation, Inc.
|
||
|
|
||
|
Permission is granted to copy, distribute and/or modify this document
|
||
|
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||
|
any later version published by the Free Software Foundation; with the
|
||
|
Invariant Sections being ``Funding Free Software'', the Front-Cover
|
||
|
Texts being (a) (see below), and with the Back-Cover Texts being (b)
|
||
|
(see below). A copy of the license is included in the section entitled
|
||
|
``GNU Free Documentation License''.
|
||
|
|
||
|
(a) The FSF's Front-Cover Text is:
|
||
|
|
||
|
A GNU Manual
|
||
|
|
||
|
(b) The FSF's Back-Cover Text is:
|
||
|
|
||
|
You have freedom to copy and modify this GNU Manual, like GNU
|
||
|
software. Copies published by the Free Software Foundation raise
|
||
|
funds for GNU development.-->
|
||
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
||
|
<style type="text/css"><!--
|
||
|
pre.display { font-family:inherit }
|
||
|
pre.format { font-family:inherit }
|
||
|
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||
|
pre.smallformat { font-family:inherit; font-size:smaller }
|
||
|
pre.smallexample { font-size:smaller }
|
||
|
pre.smalllisp { font-size:smaller }
|
||
|
span.sc { font-variant:small-caps }
|
||
|
span.roman { font-family:serif; font-weight:normal; }
|
||
|
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||
|
--></style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="node">
|
||
|
<a name="Libgcc"></a>
|
||
|
<p>
|
||
|
Next: <a rel="next" accesskey="n" href="Languages.html#Languages">Languages</a>,
|
||
|
Previous: <a rel="previous" accesskey="p" href="Interface.html#Interface">Interface</a>,
|
||
|
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||
|
<hr>
|
||
|
</div>
|
||
|
|
||
|
<h2 class="chapter">4 The GCC low-level runtime library</h2>
|
||
|
|
||
|
<p>GCC provides a low-level runtime library, <samp><span class="file">libgcc.a</span></samp> or
|
||
|
<samp><span class="file">libgcc_s.so.1</span></samp> on some platforms. GCC generates calls to
|
||
|
routines in this library automatically, whenever it needs to perform
|
||
|
some operation that is too complicated to emit inline code for.
|
||
|
|
||
|
<p>Most of the routines in <code>libgcc</code> handle arithmetic operations
|
||
|
that the target processor cannot perform directly. This includes
|
||
|
integer multiply and divide on some machines, and all floating-point
|
||
|
and fixed-point operations on other machines. <code>libgcc</code> also includes
|
||
|
routines for exception handling, and a handful of miscellaneous operations.
|
||
|
|
||
|
<p>Some of these routines can be defined in mostly machine-independent C.
|
||
|
Others must be hand-written in assembly language for each processor
|
||
|
that needs them.
|
||
|
|
||
|
<p>GCC will also generate calls to C library routines, such as
|
||
|
<code>memcpy</code> and <code>memset</code>, in some cases. The set of routines
|
||
|
that GCC may possibly use is documented in <a href="../gcc/Other-Builtins.html#Other-Builtins">Other Builtins</a>.
|
||
|
|
||
|
<p>These routines take arguments and return values of a specific machine
|
||
|
mode, not a specific C type. See <a href="Machine-Modes.html#Machine-Modes">Machine Modes</a>, for an explanation
|
||
|
of this concept. For illustrative purposes, in this chapter the
|
||
|
floating point type <code>float</code> is assumed to correspond to <code>SFmode</code>;
|
||
|
<code>double</code> to <code>DFmode</code>; and <code>long double<!-- /@w --></code> to both
|
||
|
<code>TFmode</code> and <code>XFmode</code>. Similarly, the integer types <code>int</code>
|
||
|
and <code>unsigned int<!-- /@w --></code> correspond to <code>SImode</code>; <code>long</code> and
|
||
|
<code>unsigned long<!-- /@w --></code> to <code>DImode</code>; and <code>long long<!-- /@w --></code> and
|
||
|
<code>unsigned long long<!-- /@w --></code> to <code>TImode</code>.
|
||
|
|
||
|
<ul class="menu">
|
||
|
<li><a accesskey="1" href="Integer-library-routines.html#Integer-library-routines">Integer library routines</a>
|
||
|
<li><a accesskey="2" href="Soft-float-library-routines.html#Soft-float-library-routines">Soft float library routines</a>
|
||
|
<li><a accesskey="3" href="Decimal-float-library-routines.html#Decimal-float-library-routines">Decimal float library routines</a>
|
||
|
<li><a accesskey="4" href="Fixed_002dpoint-fractional-library-routines.html#Fixed_002dpoint-fractional-library-routines">Fixed-point fractional library routines</a>
|
||
|
<li><a accesskey="5" href="Exception-handling-routines.html#Exception-handling-routines">Exception handling routines</a>
|
||
|
<li><a accesskey="6" href="Miscellaneous-routines.html#Miscellaneous-routines">Miscellaneous routines</a>
|
||
|
</ul>
|
||
|
|
||
|
</body></html>
|
||
|
|