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

Feature m instruction set #48

Merged
merged 27 commits into from
May 14, 2024

Conversation

Joshy-R
Copy link
Contributor

@Joshy-R Joshy-R commented Oct 5, 2023

Length Assertion in JALR instruction was faulty.
Implements MULHSU and MULHU.
Fixes overflow bug in MULH

@AntonLydike
Copy link
Owner

AntonLydike commented Oct 6, 2023

Hey! Thanks for these fixes! Do you mind adding a filecheck test that passes now but failed previously? I feel that this would help greatly in improving confidence in the emulation accuracy!

Something like this should do:

// RUN: riscemu -o libc %s | filecheck %s

.text
.globl main
main:
    li a0, 0xabcdefgh...
    mulh a1, a0, a0
    print a1
// CHECK: register a1 contains value ...
    mulhu a1, a0, a0
    print a1
// CHECK-NEXT: register a1 contains value ...
    ret

@AntonLydike AntonLydike self-assigned this Oct 6, 2023
@AntonLydike
Copy link
Owner

Hey @Joshy1970, if you need help with this or have any questions, feel free to let me know!

@Joshy-R
Copy link
Contributor Author

Joshy-R commented Oct 10, 2023

Hey, I got sick but will be working on it in one or two days. Seems straightforward, so I think I don't need help, but thanks for offering, and sorry for being absent for so long

kianmeng and others added 21 commits October 13, 2023 14:52
* Fix typos

Found via `codespell -L fle,sie`

* Update riscemu/decoder/__main__.py

Co-authored-by: Anton Lydike <me@AntonLydike.de>

* Remove codespell

---------

Co-authored-by: Anton Lydike <me@AntonLydike.de>
* add p2align assembler directive

* black
This moves a lot of internal data structures from `types` into `core`, because some imports got confused apparently.

It also adds csr registers, performance improvements, etc.
Currently still missing a lot of the D extension (all except `fmadd, fmsub, fnmsub, fnmadd, fadd, fsub, fmul, fdiv, fsqrt, fsgnj, fsgnjn, fsgnjx, fmin, fmax, feq, flt, fle, fld, fsd`), missing conversion and move instructions.

This may break some of the float32 stuff, so we should be very careful with this.
This patch adds the frep extension to the snitch emulator. Register staggering is not supported currently, but could be added at a later date.

This patch also adds f64 support to the xssr extension.
@Joshy-R
Copy link
Contributor Author

Joshy-R commented Oct 13, 2023

I added the filecheck now. Is there anything else i need to change?

@AntonLydike
Copy link
Owner

Heya, sorry for the lack of response, we had a busy few weeks and this fell under the table. It looks like you tried to rebase these changes in a weird way, can you try to make the diff a bit smaller?

@AntonLydike
Copy link
Owner

If you're okay with it I'd give rebasing and cleaning up the conflicts a go myself. Sorry again for letting this slip!

@AntonLydike AntonLydike merged commit 6281f44 into AntonLydike:master May 14, 2024
3 checks passed
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