-
Notifications
You must be signed in to change notification settings - Fork 15
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
Make extension discriminators clearly distinguish their purpose #4
Comments
Hello @ThinkOpenly , If i'm right, in which file of "models/" directory i can do the task ? |
There are some layers in this issue. The first, and most straightforward changess suggested by this issue are to turn instances like this:
into this:
and then adding that extension string ("Zfa" in this case) to the new function A second, and more difficult layer, is to find places where the instructions for other extensions are defined, but not even marked as extensions at all. All of the instructions in the "M" extension are like this for one prominent example, such as:
That is the right place. For the first layer, though, I have already implemented all of the necessary changes. Look at the "JSON" branch in this repository. Further work here should probably be on top of that branch. For the second layer, it is convenient that the instructions are divided up into different files by extension. So, pretty much all instructions in files like |
Hi @ThinkOpenly , I was wondering if this is applicable to #1 and #2 as well. The names and descriptions are to be added to all |
Yes, but do read #7 (comment). Adding names and descriptions is not as universally easy as I had originally envisioned. |
The PR #8 do addresses the First layer as described by @ThinkOpenly but fails to implement Second layer which is to having a function |
Greetings, @Sanket-0510, But for extension "A", I have already done it. Also the function you defined in the |
Could you please highlight the part of the code where this function has already been implemented? It seems that I may have overlooked it. I did it again for extension "A" cause I felt that you are missing onto the required function. |
I was working from the main branch reference; hence, I missed the extension function in the riscv_sys_regs.sail file which @ThinkOpenly has already has defined on the JSON branch. |
More support for #4. Using the `extension()` function in `mapping clause encdec` expressions for extensions allows a parser to clearly know when a function is part of an extension (or set of extensions).
* Move definition of function of `extension` * Utilize extension() instead of `haveZmmul()` * Utilize extension() instead of `haveUsrMode()` * Utilize extension() instead of `haveSupMode()` * Utilize extension() instead of `haveNExt()` * Utilize extension() instead of `haveZkr()` * Utilize extension() instead of `haveUsrMode()` * Move comments from `have*` functions into `extension` function * Delete all unused `have*` definitions of various extensions Fixes #4 .
I think commit 7dfb21f addresses the remaining bits of this issue sufficiently, in that there are no more |
More support for #4. Using the `extension()` function in `mapping clause encdec` expressions for extensions allows a parser to clearly know when a function is part of an extension (or set of extensions).
* Move definition of function of `extension` * Utilize extension() instead of `haveZmmul()` * Utilize extension() instead of `haveUsrMode()` * Utilize extension() instead of `haveSupMode()` * Utilize extension() instead of `haveNExt()` * Utilize extension() instead of `haveZkr()` * Utilize extension() instead of `haveUsrMode()` * Move comments from `have*` functions into `extension` function * Delete all unused `have*` definitions of various extensions Fixes #4 .
More support for #4. Using the `extension()` function in `mapping clause encdec` expressions for extensions allows a parser to clearly know when a function is part of an extension (or set of extensions).
* Move definition of function of `extension` * Utilize extension() instead of `haveZmmul()` * Utilize extension() instead of `haveUsrMode()` * Utilize extension() instead of `haveSupMode()` * Utilize extension() instead of `haveNExt()` * Utilize extension() instead of `haveZkr()` * Utilize extension() instead of `haveUsrMode()` * Move comments from `have*` functions into `extension` function * Delete all unused `have*` definitions of various extensions Fixes #4 .
* Move definition of function of `extension` * Utilize extension() instead of `haveZmmul()` * Utilize extension() instead of `haveUsrMode()` * Utilize extension() instead of `haveSupMode()` * Utilize extension() instead of `haveNExt()` * Utilize extension() instead of `haveZkr()` * Utilize extension() instead of `haveUsrMode()` * Move comments from `have*` functions into `extension` function * Delete all unused `have*` definitions of various extensions Fixes ThinkOpenly#4 .
* Move definition of function of `extension` * Utilize extension() instead of `haveZmmul()` * Utilize extension() instead of `haveUsrMode()` * Utilize extension() instead of `haveSupMode()` * Utilize extension() instead of `haveNExt()` * Utilize extension() instead of `haveZkr()` * Utilize extension() instead of `haveUsrMode()` * Move comments from `have*` functions into `extension` function * Delete all unused `have*` definitions of various extensions Fixes ThinkOpenly#4 .
Currently, fairly innocuous function names are used to mark an instruction as part of an extension:
A parser would have to know that a function name like "have*" might distinguish an extension, but there are no guarantees.
One suggested solution:
At least using a consistent function name establishes a namespace in which extensions can be enumerated, something like:
The text was updated successfully, but these errors were encountered: