-
Notifications
You must be signed in to change notification settings - Fork 79
Merged F extension instructions. Some fields are not populated #114
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1bae44e
Merged F extension instructions. Some fields are not populated
AFOliveira 0a28964
Added previously created operations description by dhower
AFOliveira 8ce8d85
Add fp.idl, fix FP operation()s from merge
38051d1
Add missing parameter to generic_rv64
6e4605f
Fixed files organization and pseudo-instructions
AFOliveira 98d6f20
Appropriately Identify floating registers
AFOliveira 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
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,25 @@ | ||
| # yaml-language-server: $schema=../../../schemas/inst_schema.json | ||
|
|
||
| fabs.s: | ||
| long_name: No synopsis available. | ||
| description: | | ||
| No description available. | ||
| definedBy: F | ||
| assembly: xd, xs1, xs2=xs1 | ||
| encoding: | ||
| match: 0010000----------010-----1010011 | ||
| variables: | ||
| - name: rs2=rs1 | ||
| location: 24-20 | ||
| - name: rs1 | ||
| location: 19-15 | ||
| - name: rd | ||
| location: 11-7 | ||
| access: | ||
| s: always | ||
| u: always | ||
| vs: always | ||
| vu: always | ||
| data_independent_timing: true | ||
| operation(): | | ||
|
|
||
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/inst_schema.json | ||
|
|
||
| fadd.s: | ||
| long_name: No synopsis available. | ||
| description: | | ||
| No description available. | ||
| definedBy: F | ||
| assembly: xd, xs1, xs2, rm | ||
| encoding: | ||
| match: 0000000------------------1010011 | ||
| variables: | ||
| - name: rs2 | ||
AFOliveira marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| location: 24-20 | ||
| - name: rs1 | ||
| location: 19-15 | ||
| - name: rm | ||
| location: 14-12 | ||
| - name: rd | ||
| location: 11-7 | ||
| access: | ||
| s: always | ||
| u: always | ||
| vs: always | ||
| vu: always | ||
| data_independent_timing: true | ||
| operation(): | | ||
|
|
||
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,73 @@ | ||
| # yaml-language-server: $schema=../../../schemas/inst_schema.json | ||
|
|
||
| fclass.s: | ||
| long_name: Single-precision floating-point classify. | ||
| description: | | ||
| The `fclass.s` instruction examines the value in floating-point register | ||
| _fs1_ and writes to integer register _rd_ a 10-bit mask that indicates | ||
| the class of the floating-point number. | ||
| The format of the mask is described in the table below. | ||
| The corresponding bit in _rd_ will be set if the property is true and | ||
| clear otherwise. | ||
| All other bits in _rd_ are cleared. | ||
| Note that exactly one bit in rd will be set. | ||
| `fclass.s` does not set the floating-point exception flags. | ||
|
|
||
| .Format of result of `fclass` instruction. | ||
| [%autowidth,float="center",align="center",cols="^,<",options="header",] | ||
| |=== | ||
| |_rd_ bit |Meaning | ||
| |0 |_rs1_ is latexmath:[$-\infty$]. | ||
| |1 |_rs1_ is a negative normal number. | ||
| |2 |_rs1_ is a negative subnormal number. | ||
| |3 |_rs1_ is latexmath:[$-0$]. | ||
| |4 |_rs1_ is latexmath:[$+0$]. | ||
| |5 |_rs1_ is a positive subnormal number. | ||
| |6 |_rs1_ is a positive normal number. | ||
| |7 |_rs1_ is latexmath:[$+\infty$]. | ||
| |8 |_rs1_ is a signaling NaN. | ||
| |9 |_rs1_ is a quiet NaN. | ||
| |=== | ||
|
|
||
| definedBy: F | ||
| assembly: xd, fs1 | ||
| encoding: | ||
| match: 111000000000-----001-----1010011 | ||
| variables: | ||
| - name: fs1 | ||
| location: 19-15 | ||
| - name: rd | ||
| location: 11-7 | ||
| access: | ||
| s: always | ||
| u: always | ||
| vs: always | ||
| vu: always | ||
| data_independent_timing: false | ||
| operation(): | | ||
| check_f_ok($encoding); | ||
|
|
||
| Bits<32> sp_value = f[fs1][31:0]; | ||
|
|
||
| if (is_sp_neg_inf?(sp_value)) { | ||
| X[rd] = 1 << 0; | ||
| } else if (is_sp_neg_norm?(sp_value)) { | ||
| X[rd] = 1 << 1; | ||
| } else if (is_sp_neg_subnorm?(sp_value)) { | ||
| X[rd] = 1 << 2; | ||
| } else if (is_sp_neg_zero?(sp_value)) { | ||
| X[rd] = 1 << 3; | ||
| } else if (is_sp_pos_zero?(sp_value)) { | ||
| X[rd] = 1 << 4; | ||
| } else if (is_sp_pos_subnorm?(sp_value)) { | ||
| X[rd] = 1 << 5; | ||
| } else if (is_sp_pos_norm?(sp_value)) { | ||
| X[rd] = 1 << 6; | ||
| } else if (is_sp_pos_inf?(sp_value)) { | ||
| X[rd] = 1 << 7; | ||
| } else if (is_sp_signaling_nan?(sp_value)) { | ||
| X[rd] = 1 << 8; | ||
| } else { | ||
| assert(is_sp_quiet_nan?(sp_value), "Unexpected SP value"); | ||
| X[rd] = 1 << 9; | ||
| } |
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,26 @@ | ||
| # yaml-language-server: $schema=../../../schemas/inst_schema.json | ||
|
|
||
| fcvt.l.s: | ||
| long_name: No synopsis available. | ||
| description: | | ||
| No description available. | ||
| definedBy: F | ||
| base: 64 | ||
| assembly: xd, xs1, rm | ||
| encoding: | ||
| match: 110000000010-------------1010011 | ||
| variables: | ||
| - name: rs1 | ||
| location: 19-15 | ||
| - name: rm | ||
| location: 14-12 | ||
| - name: rd | ||
| location: 11-7 | ||
| access: | ||
| s: always | ||
| u: always | ||
| vs: always | ||
| vu: always | ||
| data_independent_timing: true | ||
| operation(): | | ||
|
|
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,26 @@ | ||
| # yaml-language-server: $schema=../../../schemas/inst_schema.json | ||
|
|
||
| fcvt.lu.s: | ||
| long_name: No synopsis available. | ||
| description: | | ||
| No description available. | ||
| definedBy: F | ||
| base: 64 | ||
| assembly: xd, xs1, rm | ||
| encoding: | ||
| match: 110000000011-------------1010011 | ||
| variables: | ||
| - name: rs1 | ||
| location: 19-15 | ||
| - name: rm | ||
| location: 14-12 | ||
| - name: rd | ||
| location: 11-7 | ||
| access: | ||
| s: always | ||
| u: always | ||
| vs: always | ||
| vu: always | ||
| data_independent_timing: true | ||
| operation(): | | ||
|
|
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,26 @@ | ||
| # yaml-language-server: $schema=../../../schemas/inst_schema.json | ||
|
|
||
| fcvt.s.l: | ||
| long_name: No synopsis available. | ||
| description: | | ||
| No description available. | ||
| definedBy: F | ||
| base: 64 | ||
| assembly: xd, xs1, rm | ||
| encoding: | ||
| match: 110100000010-------------1010011 | ||
| variables: | ||
| - name: rs1 | ||
| location: 19-15 | ||
| - name: rm | ||
| location: 14-12 | ||
| - name: rd | ||
| location: 11-7 | ||
| access: | ||
| s: always | ||
| u: always | ||
| vs: always | ||
| vu: always | ||
| data_independent_timing: true | ||
| operation(): | | ||
|
|
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,26 @@ | ||
| # yaml-language-server: $schema=../../../schemas/inst_schema.json | ||
|
|
||
| fcvt.s.lu: | ||
| long_name: No synopsis available. | ||
| description: | | ||
| No description available. | ||
| definedBy: F | ||
| base: 64 | ||
| assembly: xd, xs1, rm | ||
| encoding: | ||
| match: 110100000011-------------1010011 | ||
| variables: | ||
| - name: rs1 | ||
| location: 19-15 | ||
| - name: rm | ||
| location: 14-12 | ||
| - name: rd | ||
| location: 11-7 | ||
| access: | ||
| s: always | ||
| u: always | ||
| vs: always | ||
| vu: always | ||
| data_independent_timing: true | ||
| operation(): | | ||
|
|
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,50 @@ | ||
| # yaml-language-server: $schema=../../../schemas/inst_schema.json | ||
|
|
||
| fcvt.s.w: | ||
| long_name: Convert signed 32-bit integer to single-precision float | ||
| description: | | ||
| Converts a 32-bit signed integer in integer register _rs1_ into a floating-point number in | ||
| floating-point register _fd_. | ||
|
|
||
| All floating-point to integer and integer to floating-point conversion instructions round | ||
| according to the _rm_ field. | ||
| A floating-point register can be initialized to floating-point positive zero using | ||
| `fcvt.s.w rd, x0`, which will never set any exception flags. | ||
|
|
||
| All floating-point conversion instructions set the Inexact exception flag if the rounded | ||
| result differs from the operand value and the Invalid exception flag is not set. | ||
| definedBy: F | ||
| assembly: fd, xs1 | ||
| encoding: | ||
| match: 110100000000-------------1010011 | ||
| variables: | ||
| - name: rs1 | ||
| location: 19-15 | ||
| - name: rm | ||
| location: 14-12 | ||
| - name: fd | ||
| location: 11-7 | ||
| access: | ||
| s: always | ||
| u: always | ||
| vs: always | ||
| vu: always | ||
| data_independent_timing: false | ||
| operation(): | | ||
| check_f_ok($encoding); | ||
|
|
||
| Bits<32> int_value = X[rs1]; | ||
|
|
||
| Bits<1> sign = int_value[31]; | ||
|
|
||
| RoundingMode rounding_mode = rm_to_mode(rm, $encoding); | ||
|
|
||
| if ((int_value & 32'h7fff_ffff) == 0) { | ||
| X[fd] = (sign == 1) ? packToF32UI(1, 0x9E, 0) : 0; | ||
| } else { | ||
| Bits<32> absA = (sign == 1) ? -int_value : int_value; | ||
| X[fd] = softfloat_normRoundPackToF32( sign, 0x9C, absA, rounding_mode ); | ||
| } | ||
|
|
||
| mark_f_state_dirty(); | ||
|
|
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,25 @@ | ||
| # yaml-language-server: $schema=../../../schemas/inst_schema.json | ||
|
|
||
| fcvt.s.wu: | ||
| long_name: No synopsis available. | ||
| description: | | ||
| No description available. | ||
| definedBy: F | ||
| assembly: xd, xs1, rm | ||
| encoding: | ||
| match: 110100000001-------------1010011 | ||
| variables: | ||
| - name: rs1 | ||
| location: 19-15 | ||
| - name: rm | ||
| location: 14-12 | ||
| - name: rd | ||
| location: 11-7 | ||
| access: | ||
| s: always | ||
| u: always | ||
| vs: always | ||
| vu: always | ||
| data_independent_timing: true | ||
| operation(): | | ||
|
|
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.