Skip to content

Commit

Permalink
Fix several coding style issues in vector extension code
Browse files Browse the repository at this point in the history
  • Loading branch information
XinlaiWan committed Oct 16, 2023
1 parent 0cb6b4f commit 432c4ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 0 additions & 2 deletions model/prelude.sail
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,6 @@ function def_spc_backwards s = ()
val def_spc_matches_prefix : string -> option((unit, nat))
function def_spc_matches_prefix s = opt_spc_matches_prefix(s)

val "print_int" : (string, int) -> unit

overload operator / = {quot_round_zero}
overload operator * = {mult_atom, mult_int}

Expand Down
20 changes: 10 additions & 10 deletions model/riscv_insts_vext_utils.sail
Original file line number Diff line number Diff line change
Expand Up @@ -846,16 +846,16 @@ function fp_nmulsub(rm_3b, op1, op2, opsub) = {
val fp_class : forall 'm, 'm in {16, 32, 64}. bits('m) -> bits('m)
function fp_class(xf) = {
let result_val_10b : bits(10) =
if f_is_neg_inf (xf) then 0b_00_0000_0001
else if f_is_neg_norm (xf) then 0b_00_0000_0010
else if f_is_neg_subnorm (xf) then 0b_00_0000_0100
else if f_is_neg_zero (xf) then 0b_00_0000_1000
else if f_is_pos_zero (xf) then 0b_00_0001_0000
else if f_is_pos_subnorm (xf) then 0b_00_0010_0000
else if f_is_pos_norm (xf) then 0b_00_0100_0000
else if f_is_pos_inf (xf) then 0b_00_1000_0000
else if f_is_SNaN (xf) then 0b_01_0000_0000
else if f_is_QNaN (xf) then 0b_10_0000_0000
if f_is_neg_inf(xf) then 0b_00_0000_0001
else if f_is_neg_norm(xf) then 0b_00_0000_0010
else if f_is_neg_subnorm(xf) then 0b_00_0000_0100
else if f_is_neg_zero(xf) then 0b_00_0000_1000
else if f_is_pos_zero(xf) then 0b_00_0001_0000
else if f_is_pos_subnorm(xf) then 0b_00_0010_0000
else if f_is_pos_norm(xf) then 0b_00_0100_0000
else if f_is_pos_inf(xf) then 0b_00_1000_0000
else if f_is_SNaN(xf) then 0b_01_0000_0000
else if f_is_QNaN(xf) then 0b_10_0000_0000
else zeros();

zero_extend(result_val_10b)
Expand Down

0 comments on commit 432c4ea

Please sign in to comment.