-
Notifications
You must be signed in to change notification settings - Fork 211
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
Add Zicfiss extension tests #417
base: dev
Are you sure you want to change the base?
Conversation
/* 1. Push using x1; popchk using x5 */;\ | ||
/* 1. Push using x5; popchk using x1 */;\ | ||
/* 1. Push using x5; popchk using x5 */;\ | ||
/* After each test ensure ssp back to initial value */;\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see where the check that "ssp is back to the initial value" is.
I see that you are comparing before/after, and adding the difference to x10,
but x10 (nor the difference in x11 ) isn't saved in the signature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mv swreg, x15 ;\
RVTEST_GOTO_MMODE ;\
DISABLE_ZICFISS() ;\
RVTEST_SIGUPD(swreg, x10, offset)
The last statement in this macro saves x10
to the signature area. Please see line number 1399.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, actually line 1318 for this macro, 1399 for the next.
So, you sum up all the deltas, and save that at the end. That can hide a lot of sins.
That's like testing lots of different add operation, combining all the results, and saving just that as the signature - which works, but not well (since compensating bugs can hide failures). And if there is a bug, you have no clue which invocation caused it. You need to replace "add x10, x10, x11" everywhere with "RVTEST_SIGUPD(swreg, x11) instead of summing them all up (you can't store the actual value because it might be loaded differently between reference and DUT). You would also need to make sure the explicit offset is handled correctly by changing the second ".if offset==0" to be ".if offset<6" I think. And. allocate more signature space, of course.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed this comment. I have updated the test macro to retain full history by replacing add x10, x10, x11
with
seqz x11, x11; or x10, x10, x11; sllw x10, x10, 1
Description
Related Issues
Ratified/Unratified Extensions
List Extensions
Reference Model Used
Mandatory Checklist:
Optional Checklist: