Table of Contents

Runtime Library Notes

Directory Structure

  sd8516/                  project root
    runtime/
      crt0.sda             startup stub -- CALL main
      librt/               runtime functions
        divhi3.c
        modhi3.c
        divsi3.c
        muldi3.c
        ...
        softfloat/         the SF/DF families
      include/             freestanding headers (mine & what clang supplies)
      tests/               tests with checks

Prep Work

Fleshing it out

Many standard implementations reveal deficiencies in instrinfo and iseltargetlowering.

Test Suite

I collected all the tests into one file.

Roadmap

then

Roadmap which requires additional development:

Phase III

Later:

Floating Point Roadmap:

File IO Roadmap:

Other:

Arena Allocator

“A growable, chunked, monotonic region allocator.”

This is very similar to the NVAR system I wrote for BASIC. Hanson uses “arena” in C Interfaces and Implementations; the academic literature says “region”. “Bump allocator” is the name of the mechanism, advancing a pointer within a chunk, but the whole structure, with chunked growth and free-everything-at-once teardown, is the arena.