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

Upload: valentine-dorsey

Post on 14-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

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