Welcome to MiniC’s documentation!

These pages document the various Python sources in the Lib/ folder of MiniC. You should not have to edit them at all.

Base library

The Lib.Statement module defines various classes that represent RISC-V assembly statements, such as labels or 3-address instructions.

We won’t create objects of these classes directly very often. Instead, to easily create such statements for standard RISC-V assembly instructions and pseudo-instructions, we give you the Lib.RiscV module.

RISC-V instructions take arguments of various kinds, as defined in the Lib.Operands module.

Linear Intermediate representation

The Lib.LinearCode module allows to work with assembly source code modeled as a list of statements.

Temporary allocation

Before implementing the all-in-memory allocator of lab 4a, you should understand the naive allocator in the Lib.Allocator module.

Indices and tables