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

Customizing allowed instruction set? #36

Open
GlaireDaggers opened this issue Aug 18, 2023 · 1 comment
Open

Customizing allowed instruction set? #36

GlaireDaggers opened this issue Aug 18, 2023 · 1 comment

Comments

@GlaireDaggers
Copy link

Hello!

I am looking into this project in the context of making an arguably somewhat esoteric "fantasy console" that tries as hard as possible to be a realistic PSX-style game console and would run on an emulated RISC-V core w/ memory mapped peripherals, etc, and wanted to avoid having to write the core emulator myself.

Ideally, I would like to opt for a very minimal rv32em instruction set, which is what I have built my GCC toolchain to target. Of course a full rv32ima core would run such instructions just fine, but I'd like to restrict the allowed registers & instruction set for added challenge. Is there a good way for me to accomplish this, should I just fork and trim out what I don't need, etc.?

@GlaireDaggers
Copy link
Author

Actually, reading through the source, maybe it would be enough for me to just define my own MINIRV32_CUSTOM_INTERNALS? So that perhaps I could write a replacement REG/REGSET that just masks the register number to fit the x0-x15 range?
That still leaves atomics but honestly I'm not sure how much I care about restricting those.

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