Hongqing Zeng, Min Xie, Yong Dong, Zhenwei Wu, Haoming Lin
{"title":"动态二进制翻译系统的高效条件码仿真","authors":"Hongqing Zeng, Min Xie, Yong Dong, Zhenwei Wu, Haoming Lin","doi":"10.1117/12.2660798","DOIUrl":null,"url":null,"abstract":"Dynamic binary translation is widely used in cross-ISA (Instruction Set Architecture) binary migration. With the technology, computers can directly execute programs compiled in other platforms, which helps to reduce the cost of software migration between different architectures. Efficient condition code emulation is critical for achieving higher performance. However, existing binary translation systems typically have to emulate the guest flags register with memory variables to hide the ISA difference, which is less-efficient due to code expansion. In this paper, we propose a way to substitute guest conditional instructions with counterpart instructions from the host ISA to achieve higher performance in flags register emulation. We recognize flag-defining and flag-checking instructions respectively through scanning the guest code sequence and then reproduce the condition pattern in the dynamically generated host code with the corresponding flag-related instructions in the host ISA. The evaluation results show that our approach manages to reduce the dynamically generated host instructions by 7.53% and improve the performance by 14.3% on average.","PeriodicalId":220312,"journal":{"name":"International Symposium on Computer Engineering and Intelligent Communications","volume":"224 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-02-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Efficient condition code emulation for dynamic binary translation systems\",\"authors\":\"Hongqing Zeng, Min Xie, Yong Dong, Zhenwei Wu, Haoming Lin\",\"doi\":\"10.1117/12.2660798\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Dynamic binary translation is widely used in cross-ISA (Instruction Set Architecture) binary migration. With the technology, computers can directly execute programs compiled in other platforms, which helps to reduce the cost of software migration between different architectures. Efficient condition code emulation is critical for achieving higher performance. However, existing binary translation systems typically have to emulate the guest flags register with memory variables to hide the ISA difference, which is less-efficient due to code expansion. In this paper, we propose a way to substitute guest conditional instructions with counterpart instructions from the host ISA to achieve higher performance in flags register emulation. We recognize flag-defining and flag-checking instructions respectively through scanning the guest code sequence and then reproduce the condition pattern in the dynamically generated host code with the corresponding flag-related instructions in the host ISA. The evaluation results show that our approach manages to reduce the dynamically generated host instructions by 7.53% and improve the performance by 14.3% on average.\",\"PeriodicalId\":220312,\"journal\":{\"name\":\"International Symposium on Computer Engineering and Intelligent Communications\",\"volume\":\"224 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-02-02\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"International Symposium on Computer Engineering and Intelligent Communications\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1117/12.2660798\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Symposium on Computer Engineering and Intelligent Communications","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1117/12.2660798","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Efficient condition code emulation for dynamic binary translation systems
Dynamic binary translation is widely used in cross-ISA (Instruction Set Architecture) binary migration. With the technology, computers can directly execute programs compiled in other platforms, which helps to reduce the cost of software migration between different architectures. Efficient condition code emulation is critical for achieving higher performance. However, existing binary translation systems typically have to emulate the guest flags register with memory variables to hide the ISA difference, which is less-efficient due to code expansion. In this paper, we propose a way to substitute guest conditional instructions with counterpart instructions from the host ISA to achieve higher performance in flags register emulation. We recognize flag-defining and flag-checking instructions respectively through scanning the guest code sequence and then reproduce the condition pattern in the dynamically generated host code with the corresponding flag-related instructions in the host ISA. The evaluation results show that our approach manages to reduce the dynamically generated host instructions by 7.53% and improve the performance by 14.3% on average.