Skip to content

v0.4: Embeddable binary translations

Choose a tag to compare

@fwsGonzo fwsGonzo released this 14 Dec 23:09
· 72 commits to main since this release
54e96ce

In this release embeddable binary translations have been implemented. They are C source files that can be generated by the emulator library based on an ELF file and the current configuration of the Machine. It can then be compiled by a system compiler, and included in a regular system binary. It will self-register to the libloong emulator and accelerate the program it was generated from. In this case, we accelerate CoreMark, and reach ~75% of native performance:

$ ./laemu --fast -O coremark.c ../tests/programs/coremark.elf
$ bash build.sh --native --lto --embed coremark.c
$ ./laemu --fast ../tests/programs/coremark.elf 
2K performance run parameters for coremark.
CoreMark Size    : 666
Total ticks      : 13101131
Total time (secs): 13.101131
Iterations/Sec   : 30531.715163
Iterations       : 400000
Compiler version : GCC14.2.0
Compiler flags   : -O3 -DPERFORMANCE_RUN=1  
Memory location  : Please put data memory location here
			(e.g. code in flash, data on heap etc)
seedcrc          : 0xe9f5
[0]crclist       : 0xe714
[0]crcmatrix     : 0x1fd7
[0]crcstate      : 0x8e3a
[0]crcfinal      : 0x65c5
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 30531.715163 / GCC14.2.0 -O3 -DPERFORMANCE_RUN=1   / Static
Program exited with code 0 (16.746 seconds)

Full Changelog: v0.3...v0.4