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

Use a constant pointer to fetch constants #401

Open
davidharrishmc opened this issue Jan 12, 2025 · 0 comments
Open

Use a constant pointer to fetch constants #401

davidharrishmc opened this issue Jan 12, 2025 · 0 comments

Comments

@davidharrishmc
Copy link
Collaborator

Using li is a bit cumbersome to fetch constants, especially for RV64. Floating-point constants are worse. Simplify this by keeping the constants in program memory and reading them from a constant pointer.

See the end of
https://docs.google.com/document/d/1diwgsQUAIEIrcQ8W-Sqkbh0SXIaVyWhoZUS2kEj24jg/edit?tab=t.0
for an example.

testgen.py will need to provide a constant pointer register that rotates like the signature pointer. li will be replaced with loadIntReg. loadIntReg and loadFloatReg should both reference the signature. They should produce comments so it is easy to know what value is being loaded.

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

No branches or pull requests

1 participant