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

arch-riscv: Fix c.jalr and c.jr instruction #1163

Merged
merged 1 commit into from
May 26, 2024

Conversation

rogerchang23424
Copy link
Contributor

The bit 0 of register should be 0 for jump address. Wrong handling the jump address may cause infinite run or segment fault.

gem5 issue: #981
Change-Id: I605de64bd3cece70288ffcfaf1f4263c17ab2971

Copy link
Contributor

@hnpl hnpl left a comment

Choose a reason for hiding this comment

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

The code looks good to me.

I'm not sure if the riscv-related tests we have contain those instructions. Can you let me know if the code has been tested?

Change-Id: I605de64bd3cece70288ffcfaf1f4263c17ab2971
@rogerchang23424
Copy link
Contributor Author

I have tested them with riscof. However, the case doesn't included in the riscof, so I add them to test case riscv-non-isa/riscv-arch-test#466.

Since we can't dump the memory signature directly with gem5. Instead, I compared the signature with customized plugin (gem5/gem5-resources#7) with other simulators.

@hnpl
Copy link
Contributor

hnpl commented May 24, 2024

That's great!!

@BobbyRBruce BobbyRBruce merged commit 4f6fdbf into gem5:develop May 26, 2024
35 checks passed
@rogerchang23424 rogerchang23424 deleted the fix-cjalr branch May 26, 2024 15:17
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.

None yet

3 participants