-
Notifications
You must be signed in to change notification settings - Fork 50
feat: add Zfinx, Zdinx, Zhinxmin extensions, modify check_f_ok for them #711
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
Draft
dhower-qc
wants to merge
2
commits into
main
Choose a base branch
from
check_f_ok
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# yaml-language-server: $schema=../../schemas/ext_schema.json | ||
|
||
$schema: "ext_schema.json#" | ||
kind: extension | ||
name: Zdinx | ||
long_name: Double-precision floating-point instructions using integer registers | ||
description: | ||
- id: ext-zdinx-instructions | ||
normative: true | ||
text: | | ||
The Zdinx extension adds all of the instructions that the D extension adds, except for the | ||
transfer instructions FLD, FSD, FMV.D.X, FMV.X.D, C.FLD[SP], and C.FSD[SP]. | ||
- id: ext-zdinx-semantics | ||
normative: true | ||
text: | | ||
The Zdinx variants of these D-extension instructions have the same semantics, except that whenever | ||
such an instruction would have accessed an f register, it instead accesses the x register with the | ||
same number. | ||
- id: ext-zdinx-rv32regpair | ||
normative: true | ||
text: | | ||
Double-precision operands in RV32Zdinx are held in aligned x-register pairs, i.e., register | ||
numbers must be even. Use of misaligned (odd-numbered) registers for double-width | ||
floating-point operands is reserved. | ||
when(): return MXLEN == 32; | ||
|
||
- id: ext-zdinx-rv32endianness | ||
normative: true | ||
text: | | ||
Regardless of endianness, the lower-numbered register holds the low-order bits, and the | ||
higher-numbered register holds the high-order bits: e.g., bits 31:0 of a double-precision | ||
operand in RV32Zdinx might be held in register x14, with bits 63:32 of that operand held | ||
in x15. | ||
when(): return MXLEN == 32; | ||
|
||
- id: ext-zdinx-rv32x0 | ||
normative: true | ||
text: | | ||
When a double-width floating-point result is written to x0, the entire write takes no effect: | ||
e.g., for RV32Zdinx, writing a double-precision result to x0 does not cause x1 to be written. | ||
when(): return MXLEN == 32; | ||
|
||
- id: ext-zdinx-rv32x1 | ||
normative: true | ||
text: | | ||
When x0 is used as a double-width floating-point operand, the entire operand is zero—i.e., | ||
x1 is not accessed. | ||
when(): return MXLEN == 32; | ||
|
||
- id: ext-zdinx-rv32mempair | ||
normative: false | ||
text: | | ||
Load-pair and store-pair instructions are not provided, so transferring double-precision | ||
operands in RV32Zdinx from or to memory requires two loads or stores. | ||
Register moves need only a single FSGNJ.D instruction, however. | ||
when(): return MXLEN == 32; | ||
|
||
type: unprivileged | ||
versions: | ||
- version: "1.0.0" | ||
state: ratified | ||
ratification_date: 2021-11 | ||
requires: Zfinx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ versions: | |
- version: "1.0.0" | ||
state: ratified | ||
ratification_date: null | ||
requires: F |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# yaml-language-server: $schema=../../schemas/ext_schema.json | ||
|
||
$schema: "ext_schema.json#" | ||
kind: extension | ||
name: Zfinx | ||
long_name: Single-precision floating-point instructions using integer registers | ||
description: | ||
- id: ext-zfinx-instructions | ||
normative: true | ||
text: | | ||
The Zfinx extension adds all of the instructions that the F extension adds, except for the | ||
transfer instructions FLW, FSW, FMV.W.X, FMV.X.W, C.FLW[SP], and C.FSW[SP]. | ||
- id: ext-zfinx-semantics | ||
normative: true | ||
text: | | ||
The Zfinx variants of these F-extension instructions have the same semantics, except that | ||
whenever such an instruction would have accessed an f register, it instead accesses the | ||
x register with the same number. | ||
type: unprivileged | ||
versions: | ||
- version: "1.0.0" | ||
state: ratified | ||
ratification_date: 2021-11 | ||
requires: Zicsr | ||
conflicts: F |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# yaml-language-server: $schema=../../schemas/ext_schema.json | ||
|
||
$schema: "ext_schema.json#" | ||
kind: extension | ||
name: Zhinxmin | ||
long_name: Minimal support for half-precision floating-point instructions using integer registers | ||
description: | ||
- id: ext-zhinxmin-instructions | ||
normative: true | ||
text: | | ||
The Zhinxmin extension includes the following instructions from the Zhinx extension: | ||
FCVT.S.H and FCVT.H.S. | ||
when(): return !implemented?(Zdinx); | ||
|
||
- id: ext-zhinxmin-instructions-with-zdinx | ||
normative: true | ||
text: | | ||
The Zhinxmin extension includes the following instructions from the Zhinx extension: | ||
FCVT.S.H, FCVT.H.S, FCVT.D.H, and FCVT.H.D. | ||
when(): return implemented?(Zdinx); | ||
|
||
type: unprivileged | ||
versions: | ||
- version: "1.0.0" | ||
state: ratified | ||
ratification_date: 2021-11 | ||
requires: Zfinx | ||
ThinkOpenly marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Parameterization for
mstateen0.FCSR
probably needs to be added here, similar to what's been done for HSTATEEN_ENVCFG_TYPE that's coming in #592.