Binary translation optimization method, binary translator and electronic device
By maintaining a pre-defined state table in the binary translator and delaying or merging zeroing operations, the code bloat problem caused by narrow write operations between AArch64 and LoongArch or RISC-V architectures is solved, thus improving the execution efficiency of the binary translation system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LOONGSON TECH CORP
- Filing Date
- 2026-04-09
- Publication Date
- 2026-07-21
AI Technical Summary
In binary translation between the AArch64 architecture and LoongArch or RISC-V architecture, due to the semantic differences in high-bit processing of narrow write operations, traditional dynamic binary translators need to generate zeroing instructions after each narrow write operation, resulting in target code bloat and performance loss, especially in vector-intensive applications such as audio and video encoding and decoding, and machine learning, where they are inefficient.
By maintaining a preset status table in the binary translator to record the status flag and effective bit width of each register, a clear instruction is inserted only when the bit width of the read operation is greater than the effective bit width indicated by the status flag. This delays or merges the physical clear operation, avoiding the generation of a clear instruction after each narrow write operation in the traditional method.
This greatly reduces redundant operations, improves the execution efficiency of the translation system, reduces the expansion of the target machine code sequence, and enhances the performance of the dynamic binary translation system.
Smart Images

Figure CN122018920B_ABST
Abstract
Citation Information
Patent Citations
Binary translation method, binary translator, electronic equipment and readable storage medium
CN119396410A
Binary translation system and method applied to X86 program
CN120122994A