Assembly to high-level language translation
- 1 November 1998
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- Vol. 1060 (10636773) , 228-237
- https://doi.org/10.1109/icsm.1998.738514
Abstract
Translation of assembly code to high-level language code is of importance in the maintenance of legacy code, as well as in the areas of program understanding, porting, and recovery of code. We present techniques used in the asm2c translator, a SPARC assembly to C translator. The techniques involve data and control flow analyses. The data flow analysis eliminates machine dependencies from the assembly code and recovers high-level language expressions. The control flow analysis recovers control structure statements. Simple data type recovery is also done. The presented techniques are extensions and improvements on previously developed CISC techniques. The choice of intermediate representation allows for both RISC and CISC assembly code to be supported by the analyses. We tested asm2c against SPEC95 SPARC assembly programs generated by a C compiler. Results using both unoptimized and optimized assembly code are presented.Keywords
This publication has 7 references indexed in Scilit:
- Intraprocedural static slicing of binary executablesPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2002
- Structuring decompiled graphsPublished by Springer Nature ,1996
- Decompilation of binary programsSoftware: Practice and Experience, 1995
- Rewriting executable files to measure program behaviorSoftware: Practice and Experience, 1994
- Binary translationCommunications of the ACM, 1993
- An Algorithm for Structuring FlowgraphsJournal of the ACM, 1977
- Control flow analysisACM SIGPLAN Notices, 1970