Interprocedural Data Flow Recovery of High-Level Language Code from Assembly

We evaluate a CISC interprocedural data ow technique for the recovery of high-level language code from assembly code; extended register copy propagation; on RISC assembly code, and provide a method for the partial construction of a RISC assembly to high-level language tool. The data ow technique is suitable for eliminating machine dependencies from the assembly code, such as registers, condition codes and stack references, and for the recovery of high-level language expressions and parameters, as well as statements. The presented method is useful for recovery of code, maintenance, port-ing and program understanding. The method has been implemented as part of asm2c, an assembly to C translator for SPARC. The program was tested against SPEC95 assembly programs generated by a C compiler. Results using both unoptimized and optimized cases are presented.