Font Size: a A A

Research And Implementation Of Code Generation And Related Optimization Technology For Stack Computer

Posted on:2013-11-19Degree:MasterType:Thesis
Country:ChinaCandidate:X D ZhaoFull Text:PDF
GTID:2298330422979903Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Stack processor, because of its fast interrupt handling, low procedure call overheads, and smallinstruction format, is used in the field of indusry control and aerospace. ALGOL and FORTH havebeen the stack operating language of the stack processor, respectively respecting the first-generationstack computer language and the second-generaion stack computer language, to distinguish these twogeneration stack computer language. Both of these languages are widely used in the stack processor,while lacking is generality. C language is a traditional high level programming language, with goodunderlying operating capacity and generality.The main purpose of this paper is to design a C compiler by LCC. It can compile the C sourcecode to the target machine code executable in the stack processor. The C compiler designed onlysupports the subset of the C language. The main work includes:(1) choose LCC as the front-end tool;(2) rewirte grammar rules for STACK16machine following LBURG grammars to construct assemblycode generator by the lburg tool;(3) design assembly file according to X86assembly file;(4) designand implement an assembler;(5) study the existing stack scheduling algorithm;(6) design andimplement an assembly code optimizer.Throuth the above work, this paper successfully achievs established goals, and the target codesproduced by the assembly code generator, assembler and assembly code optimization tool are verifiedby the ModelSim.
Keywords/Search Tags:stack processor, LCC, LBURG, assembly code generator, assembler, code optimization
PDF Full Text Request
Related items