Skip to content

Implement environment call properly #66

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

Merged
merged 1 commit into from
Oct 13, 2022
Merged

Conversation

Risheng1128
Copy link
Collaborator

Implement ecall instruction with control and status registers (CSRs)
to pass the riscv-arch-test with all privilege tests.

riscv-arch-test result:

Check ebreak                    ... OK 
Check ecall                     ... OK 
Check misalign1-jalr-01         ... OK 
Check misalign2-jalr-01         ... OK 
Check misalign-beq-01           ... OK 
Check misalign-bge-01           ... OK 
Check misalign-bgeu-01          ... OK 
Check misalign-blt-01           ... OK 
Check misalign-bltu-01          ... OK 
Check misalign-bne-01           ... OK 
Check misalign-jal-01           ... OK 
Check misalign-lh-01            ... OK 
Check misalign-lhu-01           ... OK 
Check misalign-lw-01            ... OK 
Check misalign-sh-01            ... OK 
Check misalign-sw-01            ... OK

Copy link
Contributor

@jserv jserv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I failed to run make check because of no progress.

Implement ecall instruction with control and status
registers (CSRs).

However, there may occur the situation that the elf
file doesn't contain any csr instruction. It will make
pc point to wrong address.

To resolve this, using 0 as the initial value of mtvec.
By default, the emulator executes default exception
handler when an exception occurs and mtvec stores 0.
@jserv jserv merged commit e69cc1a into sysprog21:master Oct 13, 2022
@Risheng1128 Risheng1128 deleted the pr branch October 13, 2022 19:33
vestata pushed a commit to vestata/rv32emu that referenced this pull request Jan 24, 2025
Implement environment call properly
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.

2 participants