Skip to content

Unexpected differences in sstatus bits following sret #2141

@GuMys-WanJS

Description

@GuMys-WanJS

Description

During differential testing between Spike and an RTL implementation, we observed a mismatch in the value of the sstatus CSR after trap handling and an sret instruction. To further investigate this discrepancy, we compared the same test on two Spike versions and found that Spike itself shows different behavior across releases:

v1.0.1: 0x8000000200006000  
RTL:    0x8000000200006020  
v1.1.1: 0x8000000200006220

Thus, the sstatus bits restored aftersretdiffer between:

  • RTL vs. Spike, and
  • Spike v1.0.1 vs. Spike v1.1.1.

The observed differences involve lower fields of sstatus (e.g., bits around 0x20 and 0x220), which are updated differently between versions.
We would like to ask:

  • Was this behavioral change introduced intentionally?
  • If so, which commit or specification revision introduced this update?

Clarifying this would help us properly track version-specific CSR behavior and maintain consistency in our model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions