]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/doc/gccint/the-gcc-low-level-runtime-library.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / doc / gccint / the-gcc-low-level-runtime-library.rst
CommitLineData
c63539ff
ML
1..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 Contributed by Aldy Hernandez <aldy@quesejoda.com>
7
8.. _libgcc:
9
10The GCC low-level runtime library
11---------------------------------
12
13GCC provides a low-level runtime library, :samp:`libgcc.a` or
14:samp:`libgcc_s.so.1` on some platforms. GCC generates calls to
15routines in this library automatically, whenever it needs to perform
16some operation that is too complicated to emit inline code for.
17
18Most of the routines in ``libgcc`` handle arithmetic operations
19that the target processor cannot perform directly. This includes
20integer multiply and divide on some machines, and all floating-point
21and fixed-point operations on other machines. ``libgcc`` also includes
22routines for exception handling, and a handful of miscellaneous operations.
23
24Some of these routines can be defined in mostly machine-independent C.
25Others must be hand-written in assembly language for each processor
26that needs them.
27
28GCC will also generate calls to C library routines, such as
29``memcpy`` and ``memset``, in some cases. The set of routines
30that GCC may possibly use is documented in :ref:`gcc:other-builtins`.
31
32These routines take arguments and return values of a specific machine
33mode, not a specific C type. See :ref:`machine-modes`, for an explanation
34of this concept. For illustrative purposes, in this chapter the
35floating point type ``float`` is assumed to correspond to ``SFmode`` ;
36``double`` to ``DFmode`` ; and ``long double`` to both
37``TFmode`` and ``XFmode``. Similarly, the integer types ``int``
38and ``unsigned int`` correspond to ``SImode`` ; ``long`` and
39``unsigned long`` to ``DImode`` ; and ``long long`` and
40``unsigned long long`` to ``TImode``.
41
42.. toctree::
43 :maxdepth: 2
44
45 the-gcc-low-level-runtime-library/routines-for-integer-arithmetic
46 the-gcc-low-level-runtime-library/routines-for-floating-point-emulation
47 the-gcc-low-level-runtime-library/routines-for-decimal-floating-point-emulation
48 the-gcc-low-level-runtime-library/routines-for-fixed-point-fractional-emulation
49 the-gcc-low-level-runtime-library/language-independent-routines-for-exception-handling
3ed1b4ce 50 the-gcc-low-level-runtime-library/miscellaneous-runtime-library-routines