Difference between revisions of "NaplesPU Libraries"
(Created page with "NuPlus is provided with different kind of libraries that are contained in the /libs/ folder. == libc == In this folder, we have some C standard libraries optimized for the Nu...") |
|||
Line 1: | Line 1: | ||
− | NuPlus is provided with different kind of libraries that are contained in the | + | NuPlus is provided with different kind of libraries that are contained in the libs/ folder. |
== libc == | == libc == | ||
− | + | We implemented our custom version of the following standard C libraries: | |
* ctype | * ctype | ||
* math | * math | ||
+ | * stdlib | ||
* string | * string | ||
− | Note that these libraries are not fully developed and, hence, some functions may be missing. In addition, | + | Note that these libraries are not fully developed and, hence, some functions may be missing. In particular, dynamic memory management (calloc, free, malloc, realloc) and environment (abort, atexit, at_quick_exit, exit, getenv, quick_exit, system) functions are not implemented. In addition, we redefined the stdint.h header file in order to provide a set of typedefs that specify vector types. |
− | During compilation, these libraries are archived together into a single file using the llvm-ar archiver. | + | During compilation, these libraries are archived together into a single file, i.e. libc.a, using the llvm-ar archiver. |
== libcompiler == | == libcompiler == | ||
− | This folder contains the libraries that are required by the compiler to handle operations that are not legal in the target architecture. | + | This folder contains the libraries that are required by the compiler to handle operations that are not legal in the target architecture. In particular, we implemented the following libraries: |
− | + | * divdi3.c: signed 64-bit integer division | |
− | + | * divsi3.c: signed 32-bit integer division | |
+ | * moddi3.c: signed 64-bit integer modulus | ||
+ | * modsi3.c: signed 32-bit integer modulus | ||
+ | * udivdi3.c: unsigned 64-bit integer division | ||
+ | * udivsi3.c: unsigned 32-bit integer division | ||
+ | * umoddi3.c: unsigned 64-bit integer modulus | ||
+ | * umodsi3.c: unsigned 32-bit integer modulus | ||
== crt0 == | == crt0 == |
Revision as of 16:07, 25 May 2018
NuPlus is provided with different kind of libraries that are contained in the libs/ folder.
libc
We implemented our custom version of the following standard C libraries:
- ctype
- math
- stdlib
- string
Note that these libraries are not fully developed and, hence, some functions may be missing. In particular, dynamic memory management (calloc, free, malloc, realloc) and environment (abort, atexit, at_quick_exit, exit, getenv, quick_exit, system) functions are not implemented. In addition, we redefined the stdint.h header file in order to provide a set of typedefs that specify vector types.
During compilation, these libraries are archived together into a single file, i.e. libc.a, using the llvm-ar archiver.
libcompiler
This folder contains the libraries that are required by the compiler to handle operations that are not legal in the target architecture. In particular, we implemented the following libraries:
- divdi3.c: signed 64-bit integer division
- divsi3.c: signed 32-bit integer division
- moddi3.c: signed 64-bit integer modulus
- modsi3.c: signed 32-bit integer modulus
- udivdi3.c: unsigned 64-bit integer division
- udivsi3.c: unsigned 32-bit integer division
- umoddi3.c: unsigned 64-bit integer modulus
- umodsi3.c: unsigned 32-bit integer modulus