Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: test workflow #1

Closed
wants to merge 38 commits into from
Closed

CI: test workflow #1

wants to merge 38 commits into from

Conversation

vacantron
Copy link
Owner

No description provided.

vacantron and others added 30 commits July 3, 2024 16:36
Fix incorrect condition in background thread
Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
dhrystone is compiled with sysprog21/rv32emu-prebuilt#1

coremark is compiled with sysprog21/rv32emu-prebuilt@1dac9bb,
but setting -march=rv32im

Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
This commit also fixes pip3 install error: externally-managed-environment

Reference:
- https://stackoverflow.com/questions/75608323/how-do-i-solve-error-externally-managed-environment-every-time-i-use-pip-3

Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
Fix a typo and remove outdated comment
Currently, the "JALR" indirect jump instruction turns the mode of
rv32emu from T2C back to the interpreter. This commit introduces a
"JIT-cache" table lookup to make it redirect to the T2C JIT-ed code
entry and avoid the mode change.

There are several scenarios benefitting from this approach, e.g.
function pointer invocation and far-way function call. The former
like "qsort" can be speeded up by two times, and the latter like
"fibonacci", which compiled from the hand-written assembly for
creating "JALR" instructions, can even reach x4.8 performance
enhencement.
Improve `JALR` execution with JIT-cache
@vacantron vacantron closed this Aug 18, 2024
vacantron pushed a commit that referenced this pull request Dec 14, 2024
-fsanitize=address report when CTRL+a x exiting:
=================================================================
==297977==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 23400 byte(s) in 117 object(s) allocated from:
    #0 0x761b706fd340 in calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
    #1 0x633ad9c5e310 in block_translate src/emulate.c:649
    sysprog21#2 0x633ad9c5e310 in block_find_or_translate src/emulate.c:865
    sysprog21#3 0x633ad9c5e310 in rv_step src/emulate.c:1029
    sysprog21#4 0x633ad9c5e310 in rv_run src/riscv.c:498
    sysprog21#5 0x633ad9c5e310 in main src/main.c:279

Direct leak of 3136 byte(s) in 125 object(s) allocated from:
    #0 0x761b706fd9c7 in malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x633ad9c5fea4 in match_pattern src/emulate.c:767
    sysprog21#2 0x633ad9c5fea4 in block_find_or_translate src/emulate.c:872
    sysprog21#3 0x633ad9c5fea4 in rv_step src/emulate.c:1029
    sysprog21#4 0x633ad9c5fea4 in rv_run src/riscv.c:498
    sysprog21#5 0x633ad9c5fea4 in main src/main.c:279

Register a clean up callback, async_block_clear() to free all the
allocated memory fix this when emulator exits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants