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

Initial support for RISC-V 32 I M #781

Merged
merged 141 commits into from
Jan 13, 2025
Merged

Initial support for RISC-V 32 I M #781

merged 141 commits into from
Jan 13, 2025

Conversation

clebreto
Copy link
Contributor

@clebreto clebreto commented Apr 8, 2024

Fixes #698 and #503 and #783.

rtetley and others added 27 commits February 5, 2024 09:14
…s (ADD / ADDI). (#706)

* Provides RISCV initial architecture description

and first instructions (ADD / ADDI).

Co-authored-by: Benjamin Gregoire <[email protected]>
Co-authored-by: Jean-Christophe Léchenet <[email protected]>

---------

Co-authored-by: Benjamin Gregoire <[email protected]>
Co-authored-by: Jean-Christophe Léchenet <[email protected]>
Co-authored-by: LE BRETON Come <[email protected]>
Co-authored-by: LE BRETON Come <[email protected]>
Co-authored-by: Santiago Arranz Olmos <[email protected]>
Add XOR and OR to compiler/riscv_instr_decl.v

---------

Co-authored-by: Julian Wälde <[email protected]>
Co-authored-by: Jean-Christophe Léchenet <[email protected]>
Renames registers.

Co-authored-by: Jean-Christophe Léchenet <[email protected]>
Co-authored-by: Jean-Christophe Léchenet <[email protected]>
Co-authored-by: Jean-Christophe Léchenet <[email protected]>
Co-authored-by: Jean-Christophe Léchenet <[email protected]>
Co-authored-by: Jean-Christophe Léchenet<[email protected]>
Co-authored-by: Jean-Christophe Léchenet
<[email protected]>
Co-authored-by: Jean-Christophe Léchenet
<[email protected]>
+ Fix push / pop ra to stack
It looks like gp may be used to access globals. I don't know for tp, but
to be safe I added both of them into the list of callee-saved registers.
Taking into account that division by 0 returns -1 for signed and 2ˆL-1 for unsigned.
@bgregoir
Copy link
Contributor

Did we still have work to do before merging?
Or we can resolve conflict and merge?

@vbgl
Copy link
Member

vbgl commented Dec 11, 2024

My comments above still need to be addressed.

bgregoir and others added 7 commits December 12, 2024 06:51
Let's be generous!
The pass used to systematically introduce an auxiliary register, even
for the case of constant 0, while in this case we can use register x0
directly.
+ small fix in error message in pretyping
On RISC-V, sp can be manipulated like any other register, so we can use
fewer instructions than on ARM. We use the same code as on x86, except
that we have to take special care of large immediates.
vbgl
vbgl previously approved these changes Jan 13, 2025
Copy link
Member

@vbgl vbgl left a comment

Choose a reason for hiding this comment

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

Can I squash all these commits into a single one?

@clebreto
Copy link
Contributor Author

Can I squash all these commits into a single one?

Fine with me.

@vbgl
Copy link
Member

vbgl commented Jan 13, 2025

This needs a bit of work to adapt to current main… I’m on it.

@vbgl vbgl merged commit 41068bc into main Jan 13, 2025
1 check passed
@vbgl vbgl deleted the risc-v branch January 13, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Basic description of RISC-V32 I + M + ZIFENCEI ISA
7 participants