堆棧式計(jì)算機(jī)目標(biāo)代碼生成和相關(guān)優(yōu)化技術(shù)的研究及實(shí)現(xiàn)
發(fā)布時(shí)間:2018-01-14 04:30
本文關(guān)鍵詞:堆棧式計(jì)算機(jī)目標(biāo)代碼生成和相關(guān)優(yōu)化技術(shù)的研究及實(shí)現(xiàn) 出處:《南京航空航天大學(xué)》2012年碩士論文 論文類型:學(xué)位論文
更多相關(guān)文章: 堆棧處理器 LCC LBURG 匯編代碼生成器 匯編器 代碼優(yōu)化
【摘要】:堆棧處理器由于其快速的中斷處理能力、極強(qiáng)的過(guò)程調(diào)用能力、代碼尺寸小等優(yōu)點(diǎn),一直應(yīng)用于工業(yè)控制和航空航天領(lǐng)域中。自堆棧處理器誕生以來(lái),ALGOL、FORTH這兩種語(yǔ)言一直作為堆棧處理器的棧操作語(yǔ)言,并且成為區(qū)分第一代和第二代堆棧處理器的一條重要標(biāo)準(zhǔn)。盡管這兩種語(yǔ)言在堆棧處理器領(lǐng)域應(yīng)用廣泛,但缺乏通用性。C語(yǔ)言是傳統(tǒng)的高級(jí)程序設(shè)計(jì)語(yǔ)言,其底層操作能力和通用性不言而喻。 本文的主要目的就是利用LCC實(shí)現(xiàn)一個(gè)C語(yǔ)言子集的編譯器,該編譯器能夠?qū)語(yǔ)言源代碼編譯成可以在目標(biāo)堆棧處理器上直接執(zhí)行的指令。 本文的主要工作有:(1)選擇LCC作為編譯器的前端;(2)重新書(shū)寫符合LBURG規(guī)范的堆棧處理器描述文件STACK16,并以此為輸入,利用lburg程序構(gòu)建了匯編代碼生成器;(3)參照X86匯編文件格式設(shè)計(jì)符合目標(biāo)指令集的匯編文件格式;(4)設(shè)計(jì)并實(shí)現(xiàn)一個(gè)匯編器;(5)總結(jié)現(xiàn)有的棧調(diào)度算法;(6)設(shè)計(jì)并實(shí)現(xiàn)一個(gè)匯編指令優(yōu)化器。 通過(guò)上述工作,本文成功實(shí)現(xiàn)了既定目標(biāo),,并利用ModelSim驗(yàn)證了匯編代碼生成器、匯編器、匯編指令優(yōu)化器的正確性。
[Abstract]:Because of its fast interrupt handling ability , extremely strong process calling ability , small code size and so on , the stack processor has been applied in the field of industrial control and aerospace . Since the birth of stack processor , ALGOL and FORTH have been used as the stack operating languages of stack processors . The main purpose of this paper is to use the LCC to implement a compiler of a C - language subset that can be compiled into instructions that can be executed directly on the target stack processor . The main work of this paper is : ( 1 ) selecting LCC as the front end of compiler ; ( 2 ) re - writing stack processor description file STACK16 conforming to LBURG specification ; ( 3 ) designing and implementing assembler ; ( 4 ) designing and implementing a assembler ; ( 5 ) summarizing the existing stack scheduling algorithm ; and ( 6 ) designing and implementing an assembler instruction optimizer . Through the above work , this paper has achieved the established goal successfully , and verified the correctness of assembly code generator , assembler and assembler instruction optimizer using ModelSim .
【學(xué)位授予單位】:南京航空航天大學(xué)
【學(xué)位級(jí)別】:碩士
【學(xué)位授予年份】:2012
【分類號(hào)】:TP332;TP313
【參考文獻(xiàn)】
相關(guān)期刊論文 前1條
1 儲(chǔ)昭賢;施慧彬;;基于FPGA的16位堆棧處理器的設(shè)計(jì)[J];微電子學(xué)與計(jì)算機(jī);2012年02期
相關(guān)博士學(xué)位論文 前1條
1 張惠臻;可重構(gòu)指令集處理器設(shè)計(jì)中的軟件重定向關(guān)鍵技術(shù)研究[D];中國(guó)科學(xué)技術(shù)大學(xué);2010年
本文編號(hào):1422063
本文鏈接:http://sikaile.net/kejilunwen/jisuanjikexuelunwen/1422063.html
最近更新
教材專著