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

Run linker on internal asm tests #522

Merged
merged 4 commits into from
Dec 3, 2023
Merged

Conversation

piotro888
Copy link
Member

Linker run was somehow missing for our internal assembly tests.
I created basic linker flow (with slightly modified script from our riscv-tests env).

It is needed to run asm test that I written for testing exceptions.

la (load address) instruction is example that doesn't work without linking.
la translates to:
before:

10:   00000317                auipc   t1,0x0
14:   00030313                mv      t1,t1

after:

10000010:       00000317                auipc   t1,0x0
10000014:       02430313                addi    t1,t1,36 # 10000034 <exception_handler>

@piotro888 piotro888 added the tests Tests and testbenches (not infrastructure) label Nov 24, 2023
@piotro888 piotro888 mentioned this pull request Nov 24, 2023
@tilk
Copy link
Member

tilk commented Nov 26, 2023

If I understand things correctly, the data and BSS segments are currently not used, as is the memory map. I believe that the linker script can be simplified, so that it does not suggest that these features work.

@piotro888
Copy link
Member Author

I updated it to minimal that makes sense for me. I also kept the .bss support (but removed .data), because it is already supported in test hardware (just uninitialized memory space) and may be useful for writing tests.

@piotro888 piotro888 requested a review from tilk November 27, 2023 21:01
@tilk tilk merged commit 4904a07 into kuznia-rdzeni:master Dec 3, 2023
5 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests and testbenches (not infrastructure)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants