-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(zicsr): add zicsr instructions (#41)
* feat(zicsr): add zicsr instructions + parser stubs * fix(zicsr): Add csr files to compilation * feat: add csr parsers + add some const qualifiers * fix(test): fix failing test * fix(msvc): fix msvc warning * fix(msvc): fix msvc warning +1 * fix: simplify get_immediate function * feat(zicsr): add csr instruction tests
- Loading branch information
Showing
11 changed files
with
616 additions
and
68 deletions.
There are no files selected for viewing
This file contains 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,4 @@ | ||
#pragma once | ||
#include "form/instructions.h" | ||
|
||
extern const struct formation zicsr[]; |
This file contains 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 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 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 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,16 @@ | ||
|
||
#include "form/csr.h" | ||
|
||
#include "form/generic.h" | ||
#include "parse.h" | ||
|
||
const struct formation zicsr[] = { | ||
{ "csrrw", &form_itype, &parse_csr, { 4, OP_SYSTEM, 0x1, 0 } }, | ||
{ "csrrs", &form_itype, &parse_csr, { 4, OP_SYSTEM, 0x2, 0 } }, | ||
{ "csrrc", &form_itype, &parse_csr, { 4, OP_SYSTEM, 0x3, 0 } }, | ||
{ "csrrwi", &form_itype, &parse_csri, { 4, OP_SYSTEM, 0x5, 0 } }, | ||
{ "csrrsi", &form_itype, &parse_csri, { 4, OP_SYSTEM, 0x6, 0 } }, | ||
{ "csrrci", &form_itype, &parse_csri, { 4, OP_SYSTEM, 0x7, 0 } }, | ||
|
||
END_FORMATION | ||
}; |
This file contains 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 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.