Version 1.0 marks the first public release of the rv32emu project, aligning with the research paper "Accelerating RISC-V Instruction Set Simulation with Tiered JIT Compilation," which was presented at the VMIL'24 conference.
What's Changed
- Fix the range of for loop in memory_delete() by @sammer1107 in #1
- Use computed-goto to lower instruction dispatch overhead by @sammer1107 in #2
- Fix #6 by @eecheng87 in #8
- Fix csrrwi instruction behavior according to risc-v spec by @feathertw in #10
- Support RISC-V Compressed Instructions by @xiaohan484 in #11
- adding Quake binary and usage information by @Korin777 in #13
- Integrate riscv-arch-test by @xiaohan484 in #12
- Check instruction misalignment for RV32C in the op_branch function by @dougpuob in #14
- build/quake: Lower resolution to speed up game execution by @Korin777 in #15
- Remove duplicate code by @LambertWSJ in #16
- remove
goto quit
by @LambertWSJ in #17 - fix build issue when close ENABLE_COMPUTED_GOTO by @LambertWSJ in #19
- Unify comment style by @2011eric in #23
- Detect NaN in FADD and FSUB by @2011eric in #24
- Fail to run RV32C tests by @LambertWSJ in #31
- Implement an input event specific system call for SDL by @alanjian85 in #35
- Update demo executable along with manual by @alanjian85 in #38
- Add input system support to Doom demo by @alanjian85 in #41
- Fix set PC restriction when RV32C is enabled by @RinHizakura in #44
- Implement GDB stub for remote debugging by @RinHizakura in #45
- Manage breakpoints with red-black tree by @RinHizakura in #46
- Add support of FCLASS.S by @2011eric in #47
- Enforce zero register in floating point operation by @2011eric in #48
- Fix gdbstub read memory error by @RinHizakura in #50
- Improve fmin/fmax by @2011eric in #51
- Fix comment for consistent comment style by @EagleTw in #54
- Add comments for educational usage by @EagleTw in #55
- gdbstub: Implement memory write and register write by @RinHizakura in #56
- Lower branches in red-black tree by @steven1lung in #58
- Lower branches in red-black tree again by @steven1lung in #59
- Implement ebreak properly by @Risheng1128 in #60
- Apply bidirectional queue design to the input system by @alanjian85 in #62
- Avoid duplications in RISC-V exception handlers by @Risheng1128 in #63
- Pass several privilege tests and fix RV32I comment by @Risheng1128 in #65
- Refactor rbtree previous iterator by @steven1lung in #67
- Implement environment call properly by @Risheng1128 in #66
- Eliminate memory allocations in the system call
setup_queue
by @alanjian85 in #68 - Add comment for better understanding and consistency by @EagleTw in #70
- Fix memory access violations in queue operation functions by @alanjian85 in #71
- Fix red-black tree's implementation by @alanjian85 in #72
- Refine relative mode submission mechanisms by @alanjian85 in #76
- Detect toolchain automatically by @Risheng1128 in #77
- Update demo binaries by @alanjian85 in #83
- SDL: Allow window resizing by @alanjian85 in #84
- an annotation typo in elf.h by @zoanana990 in #85
- Place floating point routines into a dedicated header by @2011eric in #86
- Decouple instruction decoding from emulation unit by @Risheng1128 in #79
- Introduce basic block by @Risheng1128 in #91
- Shorten the time spent checking instruction length by @qwe661234 in #92
- Break instruction decoding and emulation into separate stage by @jserv in #93
- Set rv->compressed for instruction ecall and ebreak by @qwe661234 in #96
- Patch for issue #98 by @qwe661234 in #100
- Refine the SDL-oriented system calls declaration by @alanjian85 in #102
- tests: line: Use fixed-point arithmetic by @maromaSamsa in #107
- Use interger shortcut in floating point routines by @2011eric in #109
- Migrate to RISC-V Compatibility Framework (RISCOF) by @Risheng1128 in #108
- Edit pointer incremental according to CodeQL analysis by @EagleTw in #112
- Add CodeQL workflow for GitHub code scanning by @lgtm-com in #89
- Fix memory leak by @qwe661234 in #113
- Reflect the introduction of RISCOF by @2011eric in #111
- Rollback partial wrong implemented code in pr #89 by @EagleTw in #114
- Update mini-gdbstub for the on_interrupt feature by @RinHizakura in #115
- Remove the computed-goto option by @Risheng1128 in #116
- Prevent the misleading information about RISCOF by @Risheng1128 in #117
- Add adaptive replacement cache by @qwe661234 in #118
- fix: Fix the typo pyton by @howjmay in #119
- Extend basic block without aggressive memory copy by @qwe661234 in #121
- Improve memory read/write by @qwe661234 in #123
- Correct the API descriptions for memory pool by @willwillhi1 in #124
- Implement LFU as default cache along with memory pool by @qwe661234 in #125
- Fix the implementations of FCVT.S.W and FCVT.S.WU by @alanjian85 in #126
- Fix make misalign in Makefile by @qwe661234 in #127
- Update mini-gdbstub and the corresponding API by @RinHizakura in #129
- Consolidate CI/CD test for gdbstub by @RinHizakura in #130
- Employ tracing extended basic blocks by @qwe661234 in #133
- Introduce preliminary macro operation fusion by @qwe661234 in #132
- Fix spicious pointer scaling by @qwe661234 in #138
- Add an option to dump registers as JSON by @long-long-float in #128
- Fix incorrect performance counter by @qwe661234 in #140
- Add test case for map API by @EagleTw in #141
- Map enhancement by @EagleTw in #144
- tests: Add script to extract CoreMark results by @qwe661234 in #143
- Add missing EBB information in cbeqz and cbnez by @qwe661234 in #147
- CI: Enforce newline at end of files by @jserv in #154
- Fix incorrectly generated config file by @2011eric in #174
- Correct a typo in mpool.h by @felixonmars in #178
- Fix typo in comment by @ChinYikMing in #179
- Improve consistency of accessing rv's registers by @ChinYikMing in #180
- Fix return NULL when malloc failed by @ChinYikMing in #181
- Call appropriate release function by @ChinYikMing in #182
- Improve macro-op fusion: skip nop and add lui + addi by @qwe661234 in #184
- Support passing argc and argv to target program by @ChinYikMing in #185
- Fix typos in README by @steven1lung in #186
- Implement static instruction usage histogram by @ChinYikMing in #187
- Support static analysis of registers by @ChinYikMing in #192
- Fix calculation of percentage and update README by @ChinYikMing in #193
- Fix total frequency calculation and update example screenshots by @ChinYikMing in #195
- Introduce sound related system calls by @ChinYikMing in #197
- Rebuilt doom for sound support by @ChinYikMing in #198
- Try to fix rv_histogram behaves weird on build/hello.elf by @gagachang in #199
- Substitute memset/memcpy calls with faster alternatives by @qwe661234 in #196
- Fix typo by @visitorckw in #203
- CI: Decouple arch-tests to shorten major validations by @jserv in #204
- Enhance sfx_handler to accomodate more formats by @ChinYikMing in #202
- Rebuilt quake for sound support by @ChinYikMing in #206
- Let read/write reuse the preallocated memory by @qwe661234 in #205
- tests: map: Enhance random number generator by @visitorckw in #209
- Improve calc_fclass() with binary decision tree by @visitorckw in #207
- Fix round_pow2 function for edge cases by @visitorckw in #210
- Refactor time retrieval functions by @visitorckw in #212
- CI: Implementing benchmark regression tests by @ChinYikMing in #213
- Update README by @ChinYikMing in #215
- Get rid of rv->X[rv_reg_zero] = 0 completely by @qwe661234 in #216
- Add comments about CSRs by @EagleTw in #217
- Fix typo by @visitorckw in #220
- Fix memory leak by @visitorckw in #222
- Tweak memory allocation size for portability by @ChinYikMing in #221
- Link the register jump by @qwe661234 in #224
- Add a new fusion instruction and remove unnecessary ones by @qwe661234 in #227
- Fix constant optimization and fused instruction by @qwe661234 in #233
- Reclaim memory when destroying mpool correctly by @RinHizakura in #235
- Reduce memory usage for instruction block by @RinHizakura in #232
- Disable control flow integrity for instruction dispatch by @jserv in #236
- Remove useless IR when fusing instructions by @qwe661234 in #234
- Macro operation fusion: sequential shift instructions by @qwe661234 in #237
- Fuse reordered lw/sw instructions by @qwe661234 in #240
- Handle csr mstatus and misa correctly by @qwe661234 in #243
- Remove tailcall member in rv_insn_t by @RinHizakura in #245
- Manipulate csr_cycle and PC by registers. Drop insn_len by @qwe661234 in #244
- Move block and IRs memory pool to rv by @qwe661234 in #246
- Enforce 'musttail' for assured tail call optimization by @jserv in #247
- Remove unused macro by @visitorckw in #248
- Fix rb_remove() key comparison by @visitorckw in #250
- Unify the hash function of cache and map by @qwe661234 in #249
- Fix cache tests fail after adding newline at the end of files by @visitorckw in #251
- Remove trailing whitespace by @EagleTw in #252
- Enable link-time optimization by default by @jserv in #253
- Fix the inaccuracy in the number of IR elements to be removed by @qwe661234 in #256
- Fix syscall_read to handle partial reads and errors by @visitorckw in #257
- Improves scripts and add docker image by @henrybear327 in #259
- Comprehensive F extension support with SoftFloat integration by @visitorckw in #260
- Remove unused 'isnanf' and 'isinff' functions by @visitorckw in #262
- Enable exit-on-error setting to gdbstub-test.sh by @henrybear327 in #263
- Fix decode annotation error by @visitorckw in #264
- Fix a potential issue where the block_find() might return NULL by @henrybear327 in #265
- Fix softfloat build failure by @visitorckw in #266
- Apply branch prediction for indirect jump by @qwe661234 in #269
- Remove memory allocation for ELF sections by @LambertWSJ in #270
- Improve efficiency of branch history table by @RinHizakura in #271
- rv_histogram: Make it more verbose by @ChinYikMing in #276
- Implement file path sanitation by @henrybear327 in #273
- Add benchmarks descriptions by @qwe661234 in #278
- Fix an error in memset's size argument. by @henrybear327 in #280
- CI: Publish Docker image to Docker Hub by @henrybear327 in #281
- CI: Build executable files during Docker image generation by @henrybear327 in #285
- Fix cache_free fucntion by @qwe661234 in #291
- Fix constant optimization on RV32F instructions by @qwe661234 in #292
- Enable build rv32emu using Emscripten by @ChinYikMing in #293
- Introduce a tier-1 JIT compiler based on x86-64 architecture by @qwe661234 in #289
- Fix potential security issue in benchmark script by @ChinYikMing in #295
- Remove unused ARC implementation by @jserv in #299
- Refactor with macro ARRAYS_SIZE by @ChinYikMing in #300
- Fix syscall error handling by @visitorckw in #303
- Fix potential buffer overflow and memory leak by @visitorckw in #302
- Consolidate public header by integrating src/state.h by @ChinYikMing in #305
- CI: Enable Arm64 host by @jserv in #306
- CI: Specify safe.directory for Arm64 by @jserv in #309
- Introduce a tier-1 JIT compiler based on aarch64 architecture by @qwe661234 in #304
- Consolidate memory allocation by @ChinYikMing in #307
- Fix invalid free and memory leak by @visitorckw in #314
- Remove GNU Toolchain for RISC-V from Dockerfile by @henrybear327 in #290
- Fix alignment exceptions issue for F and C extensions by @visitorckw in #317
- Correctly remove the template for disabled extension @qwe661234 by @qwe661234 in #319
- CI: Generate Docker image with commit SHA1 #287 by @henrybear327 in #320
- CI: Generate Docker image with Alpine Linux by @henrybear327 in #321
- Support RV32FC by @fourcolor in #316
- Fix rounding mode selection by @visitorckw in #323
- Fix cmv constant optimization bug by @fourcolor in #325
- Fix signed integer overflow in RV32IM by @visitorckw in #324
- CI: Skip pipelines if no source files are changed by @henrybear327 in #326
- Enforce doubly-linked chained block by @qwe661234 in #331
- Correct wrong opcode of conditional jump by @qwe661234 in #335
- Add profiler by @qwe661234 in #333
- Fix csrrc instruction behavior when rs1 is 0 by @visitorckw in #338
- Refine file naming scheme for profiling data by @ChinYikMing in #337
- Refine the API in the public header by @ChinYikMing in #340
- Fix a bug cache_create() by @henrybear327 in #342
- Fix a bug where a file descriptor isn't closed after allocation by @henrybear327 in #344
- Fix a typo in rb_insert by @henrybear327 in #345
- Check if a pointer is NULL before dereferencing by @henrybear327 in #346
- Improve error handling in elf_open() by @henrybear327 in #343
- Fix illegal instruction handling for SLLI, SRLI, and SRAI by @visitorckw in #348
- Introducing local register allocation for the tier-1 JIT compiler by @qwe661234 in #341
- Enable shallow git submodule by @howjmay in #350
- Drop memory_read_str function by @ChinYikMing in #351
- Fix signed integer comparison in AMOMIN.W and AMOMAX.W by @visitorckw in #352
- Fix pushing images automatically to DockerHub by @henrybear327 in #353
- Refine I/O comments by @ChinYikMing in #354
- Improve the performance of indirect jump for T1C by @qwe661234 in #355
- Bind I/O handlers during emulator initialization by @ChinYikMing in #357
- Fix reading uninitialized variable right_red in map.c (#349) by @henrybear327 in #362
- Use the canonical order of RISC-V extension names by @alanjian85 in #363
- Fix compile warning in JIT without RV32F/C by @visitorckw in #368
- CI: Add undefined behavior test by @visitorckw in #366
- Fix a memory leak in main.c by @henrybear327 in #370
- Fix RV32A error by @visitorckw in #367
- Refine cleanup logic in main.c by @ChinYikMing in #372
- End the indirect jump when potential hotspot is detected by @qwe661234 in #371
- CI: Add Clang static analyzer by @henrybear327 in #361
- Fix several critical errors in RV32A implementations by @visitorckw in #373
- Add RV32A architectural tests by @visitorckw in #374
- Add assertion to prevent buffer overflow by @vacantron in #376
- Tweak build rules for WebAssembly by @ChinYikMing in #377
- Avoid generating machine code repeatly for same basic block by @qwe661234 in #378
- Refine rv_step function prototype by @ChinYikMing in #380
- Tweak build rules to link correct SDL library by @ChinYikMing in #383
- Eliminate redundant register swapping in JIT by @vacantron in #384
- Enable run video games using WebAssembly by @ChinYikMing in #385
- Add coi-serviceworker by @ChinYikMing in #388
- CI: deploy wasm by @ChinYikMing in #389
- Fix WebAssembly CI running condition by @ChinYikMing in #392
- Fix missing dirty flag in
cmv
instruction by @vacantron in #395 - Fix hardcoded sha1sum command and compare sha1 value by @ChinYikMing in #393
- Remove redundant pipe symbol by @ChinYikMing in #396
- CI: Tweak WebAssembly CI event by @ChinYikMing in #403
- Fix ELF typo in html and output process completion indicator by @ChinYikMing in #404
- Implement features used by fenster by @alanjian85 in #364
- Rebuild ELF files for Doom and Quake by @alanjian85 in #406
- Filter out message-less demo programs from WebAssembly demo page by @ChinYikMing in #407
- CI: Bump dependency by @ChinYikMing in #409
- CI: Trigger WebAssembly CI when ELF executables rebuilt by @ChinYikMing in #408
- Fix missing colon in README by @visitorckw in #411
- Fix trailing whitespace by @visitorckw in #412
- Streamline rounding modes checks and settings in RV32F by @visitorckw in #410
- Support hosting WebAssembly demo page locally by @ChinYikMing in #413
- Remove the backward jump from the T1C condition by @qwe661234 in #414
- Add benchmarks from rv8-bench and nbench by @qwe661234 in #415
- Fix wasm build failed in deploy-wasm CI by @ChinYikMing in #416
- Add code cache flush mechanism by @qwe661234 in #417
- jit: Implement register allocation by @vacantron in #418
- Remove extra comma of SUPPORTED_SYSCALLS by @p96114175 in #421
- Fix the typo in the cache_create function comment by @p96114175 in #422
- Fix compilation error caused by missing softfloat dependency by @visitorckw in #423
- CI: Parallelize compilation for faster testing by @visitorckw in #424
- CI: Reinstate rv32fc test suite by @visitorckw in #426
- Fix typo by @ChinYikMing in #427
- Consolidate AMO RVOP coding consistency by @ChinYikMing in #428
- Fix typo by @p96114175 in #429
- Fix typo by @p96114175 in #430
- Fix typo of picture name by @p96114175 in #431
- Raise illegal instruction exception for Zicsr by @ChinYikMing in #432
- Fix syscall lseek() to return correct offset by @visitorckw in #434
- Consolidate the block_translate fucntion by @qwe661234 in #437
- Optimize syscall_write() to avoid redundant checks and FILE* retrievals by @visitorckw in #436
- Refactor mpool_calloc function by @p96114175 in #433
- Implement minimal SBI v0.3 by @ChinYikMing in #439
- Correctly update the information of hotspot by @qwe661234 in #440
- Fix typo in rv_gettimeofday comment by @p96114175 in #442
- Fix the microsecond-to-nanosecond conversion in rv_clock_gettime() by @alanjian85 in #360
- Modify get_time_info() to return seconds and nanoseconds by @visitorckw in #445
- Fix canonical order of RISC-V extension names in help information by @visitorckw in #447
- Specify can_branch and decode the sret instruction by @ChinYikMing in #443
- CI: Bump riscv-gnu-toolchain by @jserv in #444
- Remove libc subsituation by @qwe661234 in #450
- Add sret case to insn_is_unconditional_branch by @ChinYikMing in #452
- Fix typo by @p96114175 in #453
- jit: Fix overflow handling in function muldivmod by @qwe661234 in #454
- Implement tier-2 JIT compiler to accelerate ISS by @qwe661234 in #425
- Preliminary support "Svinval" Standard Extension by @ChinYikMing in #458
- Update riscv GCC toolchain and sail reference device dockerfiles by @henrybear327 in #459
- Initialize ir->branch_table->PC with safe value by @ChinYikMing in #462
- jit: Introduce background compilation by @qwe661234 in #457
- Add memory ordering instruction FENCE by @ChinYikMing in #464
- Fix incorrect condition in background thread by @vacantron in #465
- Fix a typo and remove outdated comment by @henrybear327 in #468
- Fix benchmark CI pipeline by @henrybear327 in #460
- Reintroduce benchmark.yml by @henrybear327 in #469
- Improve
JALR
execution with JIT-cache by @vacantron in #471 - Add dummy WFI implementation by @ChinYikMing in #470
- Fix jit-cache without T2C enabled by @vacantron in #476
- CI: Bump changed-files by @ChinYikMing in #478
- Fix unexpected "JALR" behavior in JIT by @vacantron in #479
- Automate prebuilt executable updates via GitHub Actions by @vacantron in #474
- Automate doom, quake, and scimark2 builds by @vacantron in #480
- Add missing condition in CI by @vacantron in #481
- Enhance precision and safety in time calculations by @visitorckw in #483
- Allocate adequate memory for running arch-test by @jserv in #485
- Bring wasm service up by @ChinYikMing in #487
- CI: Fix missing file in WebAssembly deployment by @ChinYikMing in #488
- CI: Install wget package for Alpine Linux by @jserv in #489
- Move artifact target under emcc build condition by @ChinYikMing in #493
- Avoid re-fetching binaries when they exist by @vacantron in #492
- Fix gdbstub dependency and enable parallel compilation for faster CI by @visitorckw in #494
- CI: Bump prebuilt GNU Toolchains by @jserv in #495
- Add missing bar to separate filename by @howjmay in #496
- CI: Bump Ubuntu to 24.04-LTS by @jserv in #497
- CI: Fix xPack toolchain not found when using by @ChinYikMing in #498
New Contributors
- @sammer1107 made their first contribution in #1
- @eecheng87 made their first contribution in #8
- @feathertw made their first contribution in #10
- @xiaohan484 made their first contribution in #11
- @Korin777 made their first contribution in #13
- @dougpuob made their first contribution in #14
- @2011eric made their first contribution in #23
- @alanjian85 made their first contribution in #35
- @steven1lung made their first contribution in #58
- @Risheng1128 made their first contribution in #60
- @zoanana990 made their first contribution in #85
- @jserv made their first contribution in #93
- @maromaSamsa made their first contribution in #107
- @lgtm-com made their first contribution in #89
- @howjmay made their first contribution in #119
- @willwillhi1 made their first contribution in #124
- @long-long-float made their first contribution in #128
- @felixonmars made their first contribution in #178
- @gagachang made their first contribution in #199
- @visitorckw made their first contribution in #203
- @henrybear327 made their first contribution in #259
- @fourcolor made their first contribution in #316
- @vacantron made their first contribution in #376
- @p96114175 made their first contribution in #421
Full Changelog: https://github.com/sysprog21/rv32emu/commits/v1.0