You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the haveExtension() functions are a bit confusingly named. It's unclear whether they mean that the CPU supports the extension, or if it is currently enabled (which are not necessarily the same if you have writeable misa). I believe the answer is the latter, and there are a few sys_enable_extension() functions which actually dictate whether the extension is supported. That function only exists for some extensions though.
This is confusing. I think we should do the following:
Rename all haveExtension() functions to extensionEnabled().
Rename all sys_enable_extension() functions to sys_support_extension() or sys_extension_supported().
Add sys_extension_supported() functions corresponding to all the haveExtension() functions, so they are 1:1. Initially we can just hard-code the result rather than adding CLI arguments.
Update legalize_misa() to use the sys_extension_supported() functions (even if they are hard-coded to true).
The text was updated successfully, but these errors were encountered:
I agree that this separation makes a lot of sense. Not sure it really matters but I wonder if we can use a common prefix for the enabled checks instead of a suffix? enable<Ext> isn't particularly nice but at least more explicit that haveXXX. I guess we could also use something like canUse<Ext>, is<Ext>Enabled
I think the
haveExtension()
functions are a bit confusingly named. It's unclear whether they mean that the CPU supports the extension, or if it is currently enabled (which are not necessarily the same if you have writeablemisa
). I believe the answer is the latter, and there are a fewsys_enable_extension()
functions which actually dictate whether the extension is supported. That function only exists for some extensions though.This is confusing. I think we should do the following:
haveExtension()
functions toextensionEnabled()
.sys_enable_extension()
functions tosys_support_extension()
orsys_extension_supported()
.sys_extension_supported()
functions corresponding to all thehaveExtension()
functions, so they are 1:1. Initially we can just hard-code the result rather than adding CLI arguments.legalize_misa()
to use thesys_extension_supported()
functions (even if they are hard-coded totrue
).The text was updated successfully, but these errors were encountered: