Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: libriscv/libloong

v0.7: Go bindings and macOS support

19 Dec 14:29
efbaadc

Choose a tag to compare

The new Go bindings try to match the Rust bindings for parity. A macOS CI action has been added to verify the CLI builds and runs there as well. More optimizations have gone into bytecodes, however the needle has not moved.

Recent Changes

  • Merge pull request #8 from libriscv/macos (efbaadc)
  • Add macOS CI action for CLI (03a03ed)
  • Update Go bindings to match Rust bindings (bddb32d)
  • Set up accelerated syscalls for the Rust hello world (7690492)
  • Update README (abdc273)

v0.6: Rust bindings

18 Dec 06:36
a57c443

Choose a tag to compare

There are now Rust bindings with crate package support and .deb package support.

  • Rust bindings and crate support
  • .deb package support
  • LASX support is now a CMake build option

Full Changelog: v0.5...v0.6

v0.5: Fixes and performance

15 Dec 21:14
866474b

Choose a tag to compare

This release improves the performance of memory operations, especially for JIT.

  • New shared arena mode where both Machine and memory arena reside on the same larger arena, allowing memory operations to access memory relative to the CPU
  • Merge memory accesses to the same register and nearby offset in binary translation, avoiding many checks
  • Add some missing instructions in binary translation
  • Add Fuzzer CI job

Full Changelog: v0.4...v0.5

v0.4: Embeddable binary translations

14 Dec 23:09
54e96ce

Choose a tag to compare

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

Windows MinGW support

12 Dec 21:30
f9a9cbc

Choose a tag to compare

This release adds initial Windows support with working JIT. libloong now also has shared execute segments, which makes it able to scalable in the engine architecture with many copies of the same program. Finally, the binary translator now has a background compilation mode where the most expensive compilation can happen in another thread while the emulator is running. The result gets live-patched into the execute segment.

Also reached a new CoreMark score with some improvements to binary translator:

$ ./laemu --fast ../tests/programs/coremark.elf 
2K performance run parameters for coremark.
CoreMark Size    : 666
Total ticks      : 12798197
Total time (secs): 12.798197
Iterations/Sec   : 15627.201238
Iterations       : 200000
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      : 0x4983
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 15627.201238 / GCC14.2.0 -O3 -DPERFORMANCE_RUN=1   / Static
Program exited with code 0

It's now at ~38% of native, and gets compiled and applied in the background allowing emulator to start immediately.

Full Changelog: v0.2...v0.3

Binary translation

09 Dec 17:00
35228df

Choose a tag to compare

Initial binary translation using embedded TinyCC as just-in-time compiler

$ ./laemu ../tests/programs/coremark.elf 
2K performance run parameters for coremark.
CoreMark Size    : 666
Total ticks      : 16665649
Total time (secs): 16.665649
Iterations/Sec   : 12000.732765
Iterations       : 200000
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      : 0x4983
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 12000.732765 / GCC14.2.0 -O3 -DPERFORMANCE_RUN=1   / Static
Program exited with code 0

Note: Binary translation currently uses and-masking for memory ops, which means that permissions aren't enforced. It's all writable, but still sandboxed.

v0.1: Initial release

03 Dec 19:23
8644048

Choose a tag to compare

v0.1: Initial release Pre-release
Pre-release

In this release a 3000+ CoreMark score was reached. Some programs are running smoothly, others are not.

$ ./laemu ../tests/programs/coremark.elf 
2K performance run parameters for coremark.
CoreMark Size    : 666
Total ticks      : 13009150
Total time (secs): 13.009150
Iterations/Sec   : 3074.758920
Iterations       : 40000
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      : 0x25b5
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 3074.758920 / GCC14.2.0 -O3 -DPERFORMANCE_RUN=1   / Static
Program exited with code 0