Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
arakis committed Jan 12, 2019
1 parent 08a27d8 commit 2b24ba5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/booting-on-physical-machine.rst
Expand Up @@ -8,7 +8,7 @@ While most of the development and testing of MOSA is done using virtualization s

Here are detailed instructions for writing MOSA operating system to a USB Drive:

1. Download the `dd <http://www.chrysocome.net/dd>``__ utility for Windows.
1. Download the `dd <http://www.chrysocome.net/dd>`__ utility for Windows.

2. Extract the ``dd.exe`` executable to:

Expand Down Expand Up @@ -43,4 +43,4 @@ Get a list all the block devices on your system by typing the command below. Fin
7. Wait until all the blocks are written to the USB key before disconnecting it.

8. Now boot a PC or laptop with the USB Key connected!
c

19 changes: 19 additions & 0 deletions docs/compiler-design.rst
@@ -0,0 +1,19 @@
The MOSA Compiler Framework is based on the idea of a pipeline. Every method is compiled by a method compiler, that specifies the pipeline to use for compilation. Such a pipeline may consist of any number of compilation stages. These stages can be grouped into various kinds:

- Compiler Frontends - Create an instruction stream from a source specific representation, such as CIL or Java byte code
- Transformation Stages - Transform the instruction stream between various representations
- Optimization Stages - Various stages intended to optimize the code to execute faster
- Register Allocation - Allocate architecture specific registers to operands used in the instruction stream
- Compiler Backends - Generate code from the intermediate and architecture specific representations

The compiler framework provides predefined pieces of this pipeline. Some parts, especially the code generation, are provided by the architecture specific stages, such as for the x86 platform.

.. rubric:: Intermediate representations

The compiler framework uses a linear intermediate representation to transform the source program text into machine code. There are several levels of intermediate representations before code generation. These are:

- CIL - Common Intermediate Language
- IR - High-Level Intermediate Representation
- MIR - Machine specific Intermediate Representation

During compilation of an CIL method the instructions are represented by CIL instruction classes and moving forward, the linear instruction stream is modified to use instructions from the intermediate representation. In some cases an instruction from the intermediate representation can not be emitted directly to machine code and it is replaced by a sequence of machine specific instruction objects. The machine specific instruction classes are provided by the appropriate platform. There are other uses for machine specific instruction classes, but the main use is effective code generation.
1 change: 1 addition & 0 deletions docs/index.rst
Expand Up @@ -7,6 +7,7 @@ Contents
intro
faq
booting-on-physical-machine
compiler-design
tests
get-involved
authors
Expand Down

0 comments on commit 2b24ba5

Please sign in to comment.