NaplesPU Libraries

From NaplesPU Documentation
Revision as of 15:07, 25 May 2018 by Edo (talk | contribs)
Jump to: navigation, search

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

crt0