Skip to main content
Log in

A Machine State Transition Approach to Instruction Retargeting for Embedded Microprocessors

  • Published:
Design Automation for Embedded Systems Aims and scope Submit manuscript

Abstract

This paper presents an interesting approach to retargeting existing software at the assembly (or binary) level from one instruction set to another instruction set. The approach is based on abstracting the instruction set behaviors as symbolic transitions of the machine states. The retargeting process is modeled as a planning process, an AI technique, that finds a plan (a sequence of operations) which brings the target processor from the same initial state to the same final state as the original software does on the source processor. The approach has been successfully applied in a design project of an x86 compatible microprocessor with an embedded internal RISC core for efficient execution. The proposed approach produced optimal x86-to-RISC mapping. In addition, the approach made it easy to keep up with microarchitecture revision during the design exploration phase since the mapping table can be automatically re-generated and re-evaluated promptly, which is difficult to achieve manually.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. M. E. Benitez, J. W. Davidson: “A Retargetable Code Improver,” University of Virginia.

  2. A. V. Aho, M. Ganapathi, S. W. K. Tjiang: “Code Generation Using Tree Matching and Dynamic Programming,” ACM Trans. on Programming Languages and Systems, Vol. 11,No. 4, Oct. 1989.

  3. M. Corazao, M. Khalaf, L. Guerra, M. Potkonjak, J. Rabaey: “Instruction Set Mapping for Performance Optimization,” Proc. of ICCAD, Nov. 1993.

  4. C. Liem, P. Paulin, M. Cornero, A. Jerraya: “Industrial Experience Using Rule-driven Retargetable Code Generation for Multimedia Applications,” TIMA Laboratory and Central R&D.

  5. C. Liem, Retargetable Compilers for Embedded Core Processors, Methods and Experiences in Industrial Applications. Kluwer Academic Publishers, 1997.

  6. A. Sudarsanam, S. Malik: “Simultaneous Reference Allocation in Code Generation for Dual Data-Memory Bank ASIPs,” IEEE International Conference on CAD, 1995.

  7. B. K. Holmer, A. M. Despain: “Viewing Instruction Set Design as an Optimization Problem,” Proc. of MICRO-24, 1991.

  8. P. L. Van Roy, “Can Logic Programming Execute as Fast as Imperative Programming,” Ph.D. thesis, Technical Report UCB/CSD 90/600, Univ. of California, Berkeley, 1990.

    Google Scholar 

  9. R. E. Fikes, N. J. Nilsson, “STRIPS: A new approach to the application of theorem proving to problem solving,” Artificial Intelligence, 2:189–208, 1971.

    Google Scholar 

  10. D. E. Wilkins, Practical Planning: Extending the Classical AI Planning Paradigm. Morgan Kaufmann, San Mateo, CA, 1988.

    Google Scholar 

  11. A. V. Aho, R. Sethi, J.D. Ullman, Compilers Principles, Techniques, and Tools. Addison Wesly, 1985.

  12. AMD-K5 Technical Reference Manual, http://www.amd.com/products/cpg/techdocs/appnotes/18524c.pdf.

  13. Pentium Processor Overview, http://developer.intel.com/design/pentium/.

  14. I. J. Huang and T. C. Peng, “Analysis of x86 Instruction Set Usage for DOS/Windows Applications and Its Implication on Superscalar Design,” Proceedings of International Conference on Computer Design, 1998.

  15. I. J. Huang and W. F. Gao, “Instruction Retargeting Based on the State Pair Notation,” Proc. of Asia and Pacific Conference on Hardware Description Languages, pp. 114–120, Aug. 1997.

  16. P. Marwedel and G. Goossens, Code Generation for Embedded Processors. Kluwer Academic Publisher, 1995.

  17. P. Marwedel, “Tree-based Mapping of Algorithm to Predefined Structures,” ICCAD, 1993.

  18. RASM51E MCS-51 Cross Assembler, http://ftp.unina.it/pub/eletrocnics/ftp.armory.com.8051/RASM51E.TXT.

  19. XASM Cross Assembler, http://www.nuri.net/simtel.net/msdos/crossasm-pre.html/xasm220.zip.

  20. R. L. Sites et al., “Binary Translation,” Communication of the ACM, Feb. 1993.

  21. W. E. George, A. Newell, “Some issues of representation in a general problem solver,” Sprint Joint Computer Conference 30, 1967.

  22. C. Hunter, J. Banning, “DOS at RISC,” BYTE, Nov. 1989.

  23. M. Johnson, Superscalar Microprocessor Design. Prentice Hall, 1991.

  24. R. P. Nelson, Microsoft's 80386/80486 Programming Guide. Microsoft Press, 1991.

  25. A. Ghernoff et at., “FX!32 A Profile-directed Binary Translator,” IEEE Micro, pp. 56–64, March/April 1998.

  26. C. Cifuentes, “Partial Automation of Integrated Reverse Engineering Environment of Binary Code,” Proceedings Third Working Conference on Reverse Engineering, pp. 50–56, IEEE-CS Press, Nov. 1996.

  27. C. Cifuentes, S. Sendall, “Specifying the Semantics of Machine Instructions,” Proceedings of the International Workshop on Program Comprehension, pp. 126–133, June 1998.

  28. N. Ramsey, M. Fernández, “Specifying Representations of Machine Instructions,” ACM Transactions on Programming Languages and Systems, 19(3):492–524, May 1997.

    Google Scholar 

  29. J. Loeckx, K Sieber, Chapter 3, The Foundations of Program Verification, 2nd ed. John Wiley & Sons, 1987.

  30. J. Fernandez, et al., “On-the-fly Verification of Finite Transition Systems,” Journal of Formal Methods in System Design, 1:251–273, 1992.

    Google Scholar 

  31. R. Kurshan, Section 3.2, Computer-Aided Verification, Kluwer Academic Publishers, 1993.

  32. C. Monahan, F. Brewer, “Symbolic Modeling and Evaluation of Data Paths,” Proc. ACM/IEEE 32nd Design Automation Conference, June 1995.

  33. S. Bashford and R. Leupers, “Phase-Coupled Mapping of Data Flow Graphs to Irregular Data Paths,” Journal of Design Automation for Embedded Systems.

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Huang, IJ., Kao, WF. A Machine State Transition Approach to Instruction Retargeting for Embedded Microprocessors. Design Automation for Embedded Systems 5, 153–177 (2000). https://doi.org/10.1023/A:1008926807523

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/A:1008926807523

Navigation