Skip to content

Bugfix/act fixes - #59

Merged
eyck merged 2 commits into
Minres:mainfrom
mag-de:bugfix/act_fixes
Sep 23, 2026
Merged

eyck merged 2 commits into
Minres:mainfrom
mag-de:bugfix/act_fixes

Conversation

@mag-de

@mag-de mag-de commented Sep 22, 2026

Copy link
Copy Markdown

No description provided.

Magnus Degle added 2 commits September 22, 2026 16:46
using ACT showed that mtval handling was incorrect and mstatush must exist
Issues were incorrect precedence in generator code and missing update of fcsr. These were exposed by ACT. TODO: correct the generator and CoreDsl.
@EAlexJ
EAlexJ requested a review from eyck September 22, 2026 15:15

@eyck eyck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The changes in vm_rv32gc and vm_rv64gc need to be reflected in teh CoreDSL desciptions (https://github.com/Minres/RISCV_ISA_CoreDSL) otherwise they get overwritten by a generation run...

// execute instruction
{
*(F+rd) = NaNBox32(((uint32_t)(~bit_sub<31, 31-31+1>(unbox_s(traits::FLEN, *(F+rs2))))& ((1ULL << 1)-1)<<31)|bit_sub<0, 30-0+1>(unbox_s(traits::FLEN, *(F+rs1))));
*(F+rd) = NaNBox32((((uint32_t)(~bit_sub<31, 31-31+1>(unbox_s(traits::FLEN, *(F+rs2))))& ((1ULL << 1)-1))<<31)|bit_sub<0, 30-0+1>(unbox_s(traits::FLEN, *(F+rs1))));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SInce this is generated code, Is this fixed in the CoreDSL description or generator??

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

No it is currently only fixed in the generated code, but @EAlexJ said he will fix the generator, as well.

// execute instruction
{
*(F+rd) = NaNBox64(f32tof64(unbox_s(traits::FLEN, *(F+rs1)), get_rm(rm)));
uint32_t flags = fget_flags();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same here: is it fixed in CoreDSL?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Same here, only fixed in the generated code.

@eyck
eyck merged commit 49a782f into Minres:main Sep 23, 2026
6 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.

2 participants