A Novel Chaining Approach to Indirect Control Transfer Instructions

  • Wei Chen
  • Zhiying Wang
  • Qiang Dou
  • Yongwen Wang
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6908)


Both dynamic binary translation systems and optimization systems store the translated or optimized code in the software maintained code cache for reuse. The performance of the code cache is crucial. Translated code is usually organized as code blocks in the code cache and each code block transfer control to the next one through a control transfer instruction. As the target address of a control transfer instruction is in the form of its source program counter, the conventional code cache system has to check the address mapping table for the translated target address to find the required target code block, which will cause considerable performance degradation. Control transfer instructions can be divided into two categories as direct control transfer instructions and indirect control transfer instructions. For indirect control transfer instructions, the target address is hold in the register or memory element whose content can be changed during the execution of the program. It is difficult to chain the indirect control transfer instructions with a fixed translated target address through pure software approaches. A novel indirect control transfer chaining approach is proposed in this paper. The principle of the technique is to insert custom chaining instructions into the translated code block while translating the indirect control transfer instructions and execute those chaining instructions to implement dynamical chaining. Some special hardware and software assists are proposed in this paper. Evaluation of the proposed approach is conducted on a code cache simulator. Experiment results show that our hardware assisted indirect control transfer instruction chaining approach can improve the performance of the code cache system dramatically.


code cache indirect control transfer instruction dynamic chaining simulator 


  1. 1.
    Cettei, K.H.: Code Cache Management in Dynamic Optimization Systems. Phd. Thesis. Harvard University, Cambridge, Massachusetts (2004)Google Scholar
  2. 2.
    Xu, W., Chen, W., Dou, Q.: A Novel Chaining Approach for Direct Control Transfer Instructions. In: The IEEE International Workshop on Digital Computing Infrastructure and Applications, in Conjunction with the 16th International Conference on Parallel and Distributed Systems, pp. 664–669. IEEE Press, New York (2010)Google Scholar
  3. 3.
    Dehnert, J.C., Grant, B.K., Banning, J.P., Johnson, R., Kistler, T., Klaiber, A., Mattson, J.: The Transmeta Code MorphingTM Software: Using Speculation, Recovery, and Adaptive Retranslation to Address Real-Life Challenges. In: 1st Annual IEEE/ACM International Symposium on Code Generation and Optimization (CGO 2003), pp. 15–24. IEEE Press, New York (2003)CrossRefGoogle Scholar
  4. 4.
    Ebcioglu, K., Altman, E.R.: DAISY: Dynamic Compilation for 100% Architectural Compatibility. In: 24th International Symposium on Computer Architecture (ISCA 1997), pp. 26–37. ACM Press, New York (1997)CrossRefGoogle Scholar
  5. 5.
    Baraz, L., Devor, T., Etzion, O., Goldenberg, S., Skaletsky, A., Wang, Y., Zemach, Y.: IA-32 Execution Layer: a two-phase dynamic translator designed to support IA-32 applications on Itanium®-based systems. In: 36th International Symposium on Microarchitecture (MICRO 2003), pp. 191–204. IEEE Press, Washington, DC (2003)Google Scholar
  6. 6.
    Bala, V., Duesterwald, E., Banerjia, S.: Dynamo: A Transparent Dynamic Optimization System. In: The ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2000), pp. 1–12. ACM Press, New York (2000)CrossRefGoogle Scholar
  7. 7.
    Hookway, R.J., Herdeg, M.A.: Digital FX!32: Combinning Emulation and Binary Translation. Digital Techncal Journal 9(1), 3–12 (1997)Google Scholar
  8. 8.
    Ung, D., Cifuentes, C.: Machine-Adaptable Dynamic Binary Translation. In: The ACM SIGPLAN Workshop on Dynamic and Adaptive Compilation and Optimization (DYNAMO 2000), pp. 41–51. ACM Press, New York (2000)CrossRefGoogle Scholar
  9. 9.
    Kevin Scott, N., Kumar, S., Velusamy, B., Childers, J.W., Davidson, M.L.: Soffa: Retargetable and Reconfigurable Software Dynamic Translation. In: The International Symposium on Code Generation and Optimization, pp. 36–47. IEEE Press, New York (2003)Google Scholar
  10. 10.
    Desoli, G., Mateev, N., Duesterwald, E., Faraboschi, P., Fisher, J.A.: DELI: A New Run-Time Control Point. In: The 35th International Symposium on Microarchitecture, pp. 257–268. IEEE Press, New York (2002)Google Scholar
  11. 11.
    Kim, H.-S.: A Co-Designed Virtual Machine for Instruction Level Distributed Processing. Ph.D thesis. University of Wisconsin Madison, USA (2004)Google Scholar
  12. 12.
    Hennessy, J.L., Patterson, D.A.: Computer Architecture: A Quantitative Approach, 3rd edn. Morgan Kaufman Publishers, San Francisco (2002)zbMATHGoogle Scholar
  13. 13.
  14. 14.
    Chen, W.: Research on Dynamic Binary Translation Based Co-Designed Virtual Machine. Ph.D thesis. National University of Defense Technology (2010)Google Scholar

Copyright information

© IFIP International Federation for Information Processing 2011

Authors and Affiliations

  • Wei Chen
    • 1
  • Zhiying Wang
    • 1
  • Qiang Dou
    • 1
  • Yongwen Wang
    • 1
  1. 1.School of ComputerNational University of Defense TechnologyChangshaChina

Personalised recommendations