-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mega commit that introduce massive changes, most notably a Sail versi…
…on upgrade - necessary because the riscv model repo upgraded and no longer compiles with the older sail version - and the generation of compiling assembly (ast->str) code Additionally, the following were done: 1- Code gen no longer handles indentation, but generates minified C and assumes an external formatting pass 2- As part of making the generated assembly code compile, several hand-written helpers were implemented to simplify the generator and avoid having to understand arbitrary Sail functions and mappings 3- As part of making the generated assembly code compiles, tostr logic clauses identify their arguments by index, not by name (because the name might differ in the assembly clause from the canonical name introduced by the execute function in the ast) 4- The CI was updated to install and run clang-format, but it will still be updated in the coming versions to compare the assembly code (it can't compare now as there is no old committed code to compare against)
- Loading branch information
Showing
29 changed files
with
119,655 additions
and
7,841 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
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 |
---|---|---|
@@ -1,15 +1,27 @@ | ||
open Common_types | ||
open Sail_values | ||
|
||
type case_id = string | ||
type case_name = string | ||
|
||
type bv_lit_xor_arg_idx = | ||
| Bv_lit of string * int (* bitv size of literal *) | ||
| Arg_idx of int * int (* bitv size of arg *) | ||
|
||
type intrinsic_logic_arg = | ||
| Arg_index of int | ||
| Bv_concat of bv_lit_xor_arg_idx list | ||
|
||
type tostr_logic = | ||
| Lit of string | ||
| Bitv2Str of string * bv2str_table | ||
| Enum2Str of string * enum2str_table | ||
| Bool2Str of string * bool2str_table | ||
| Struct2str of string * string * struct2str_table | ||
| Intrinsic_tostr_logic of string * string list | ||
| Bitv2Str of int * bv2str_table | ||
| Enum2Str of int * enum2str_table | ||
| Bool2Str of int * bool2str_table | ||
| Struct2str of int * struct2str_table | ||
| Intrinsic_tostr_logic of string * intrinsic_logic_arg list | ||
|
||
type subcase_condition = (int * string) option | ||
|
||
type subcase = subcase_condition * tostr_logic list | ||
|
||
type assembler_clause = case_id * tostr_logic list | ||
type assembler_clause = case_name * subcase list | ||
|
||
type assembler = assembler_clause list |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
open Common_types | ||
open Sail_values | ||
open Decoder | ||
|
||
type bv_val = string | ||
|
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.