-
公开(公告)号:KR1020080096306A
公开(公告)日:2008-10-30
申请号:KR1020070041603
申请日:2007-04-27
Applicant: 재단법인서울대학교산학협력재단
IPC: G06F9/45
Abstract: A compiling method for optimal placement of scaling shifts and a system thereof are provided to efficiently generate codes by removing the reverse effect due to the insertion of scaling shift operation. A compiler(108) is divided into a generation means(210) and back-end(220). The generation means produces intermediate codes which are internal representation by analyzing inputted source codes(109), and the back-end produces an object code(110) from the intermediate code. The generation means comprises a lexical analysis means(211), a parsing means(212), a semantic analysis means(213), an intermediate code generation means(214). The lexical analysis means separates necessary tokens from the source code. The parsing means composes the tokens according to a given grammar. The meaning analyzing mean gives meaning to the grammar found out by the parsing means. The intermediate code generation means generates an intermediate code from the source code produced through the meaning analyzing mean. The back-end part includes a transforming means(221) and a translating means(222). The transforming means transforms the intermediate code according to a correction-writing rule, and the translating means generates an object code by selecting a proper command for the object code and assigning a register to the selected command.
Abstract translation: 提供了一种用于缩放位移的最佳放置的编译方法及其系统,以通过消除由于插入缩放移位操作而引起的反向效应来有效地生成代码。 编译器(108)被分成生成装置(210)和后端(220)。 生成装置通过分析输入的源代码(109)产生内部表示的中间代码,后端从中间代码生成目标代码(110)。 生成装置包括词法分析装置(211),解析装置(212),语义分析装置(213),中间代码生成装置(214)。 词法分析意味着从源代码中分离出必要的令牌。 解析手段根据给定的语法组成令牌。 意义分析意味着对解析手段发现的语法的意义。 中间代码生成装置从通过意义分析装置生成的源代码生成中间代码。 后端部分包括变换装置(221)和平移装置(222)。 变换装置根据校正写入规则变换中间代码,并且转换装置通过为目标代码选择适当的命令并向所选择的命令分配寄存器来产生目标代码。