Reverse Compilation of Digital Signal Processor Assembler Source to ANSI-C

  • Authors:
  • Adrian Johnstone;Elizabeth Scott;Tim Womack

  • Affiliations:
  • -;-;-

  • Venue:
  • ICSM '99 Proceedings of the IEEE International Conference on Software Maintenance
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

Digital Signal Processors (DSPs) are special purpose microprocessors optimised for embedded applications that require high arithmetic rates. These devices are often difficult to compile for: compared to modern general purpose processors DSPs often have very small address spaces. In addition they contain unusual hardware features and they require correct scheduling of operands against pipeline registers to extract the highest levels of available performance. As a result, high level language compilers for these devices generate poor quality code, and are rarely used in practice.Recently, new generation processors have been launched that are very hard to program by hand in assembler because of the complexity of their internal pipelines and arithmetic structures. DSP users are therefore having to migrate to using high level language compilers since this is the only practical development environment. However, there exist large quantities of legacy code written in assembler which represent a significant investment to the user who would like to be able to deploy core algorithms on the new processors without having to re-code from scratch. This paper presents a working report on the development and use of a tool to automatically reverse-compile assembler source for the ADSP-21xx family of DSPs to ANSI-C. We include a discussion of the architectural features of the ADSP-21xx processors and the ways in which they assist the translation process. We also identify a series of translation challenges which, in the limit, can only be handled with manual intervention and give some statistics for the frequency with which these pathological cases appear in real applications.