Back end MathWorks Compiler Course – Day 6 lexemes Cfg tables Symbols Generator Emitter Assembler...

5
• Back end MathWorks Compiler Course – Day 6 lexemes Cfg tables Symbols Generator Emitter Assembl er semantic actions cpu instructions executable bits syntax tree symbol table hardwar e

Transcript of Back end MathWorks Compiler Course – Day 6 lexemes Cfg tables Symbols Generator Emitter Assembler...

Page 1: Back end MathWorks Compiler Course – Day 6 lexemes Cfg tables Symbols Generator Emitter Assembler semantic actions cpu instructions executable bits syntax.

• Back end

MathWorks Compiler Course – Day 6

lexemes

Cfg tables

Symbols

Generator

Emitter

Assembler

semantic actions

cpu instructions

executable bits

syntax tree

symbol table

hardware

Page 2: Back end MathWorks Compiler Course – Day 6 lexemes Cfg tables Symbols Generator Emitter Assembler semantic actions cpu instructions executable bits syntax.

• Hardware– Memory (address modes)– real arithmetic (FPS)– integer arithmetic– testing (flags)– branching (self-relative)– faults & loops (MATLAB crash)

MathWorks Compiler Course – Day 6

Page 3: Back end MathWorks Compiler Course – Day 6 lexemes Cfg tables Symbols Generator Emitter Assembler semantic actions cpu instructions executable bits syntax.

• Hardware

• C puns (in MEX)t = (unsigned int (*)(void*))code;

res = t(frame);

float d = *(float*)addr;

int i = *(int*)addr;

MathWorks Compiler Course – Day 6

Page 4: Back end MathWorks Compiler Course – Day 6 lexemes Cfg tables Symbols Generator Emitter Assembler semantic actions cpu instructions executable bits syntax.

• Hardware

• C puns

• Runtime library– go– static jackets– >> makeRuntime

MathWorks Compiler Course – Day 6

Page 5: Back end MathWorks Compiler Course – Day 6 lexemes Cfg tables Symbols Generator Emitter Assembler semantic actions cpu instructions executable bits syntax.

• Hardware

• C puns

• Runtime library

• Emulation– step forward/back– demo

MathWorks Compiler Course – Day 6