chipsalliance / VeeR-ISS

Apache License 2.0
114 stars 33 forks source link

Regarding csrrw instruction fail in case of write/swap to FRM #5

Closed UrvishkumarPatel closed 3 years ago

UrvishkumarPatel commented 3 years ago

In function CsRegs::updateFcsrGroupForWrite(CsrNumber number, URV value)

for (number == CsrNumber::FRM)

setSimulatorRoundingMode(RoundingMode(value));

must be replaced by the following:

setSimulatorRoundingMode(RoundingMode((fcsrVal >> shift)));
jrahmeh commented 3 years ago

Hi Urvish,

Many thanks for reporting this issue and providing a fix. I added your fix to the repository.

Joe

On Fri, Feb 12, 2021 at 5:59 AM Urvish Patel notifications@github.com wrote:

In function CsRegs::updateFcsrGroupForWrite(CsrNumber number, URV value)

for (number == CsrNumber::FRM)

setSimulatorRoundingMode(RoundingMode(value));

must be replaced by the following:

setSimulatorRoundingMode(RoundingMode((fcsrVal >> shift)));

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/chipsalliance/SweRV-ISS/issues/5, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASHQX2KPM557VOM76J7CXTS6UJYVANCNFSM4XQR7MFA .