diff options
Diffstat (limited to 'riscV')
-rw-r--r-- | riscV/Machregsaux.ml | 2 | ||||
-rw-r--r-- | riscV/Machregsaux.mli | 3 | ||||
-rw-r--r-- | riscV/OpWeights.ml | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/riscV/Machregsaux.ml b/riscV/Machregsaux.ml index 840943e7..e3e47946 100644 --- a/riscV/Machregsaux.ml +++ b/riscV/Machregsaux.ml @@ -18,3 +18,5 @@ let class_of_type = function | AST.Tint | AST.Tlong -> 0 | AST.Tfloat | AST.Tsingle -> 1 | AST.Tany32 | AST.Tany64 -> assert false + +let nr_regs = [| 26; 32|] diff --git a/riscV/Machregsaux.mli b/riscV/Machregsaux.mli index 01b0f9fd..bb3777bf 100644 --- a/riscV/Machregsaux.mli +++ b/riscV/Machregsaux.mli @@ -15,3 +15,6 @@ val is_scratch_register: string -> bool val class_of_type: AST.typ -> int + +(* Number of registers in each class *) +val nr_regs : int array diff --git a/riscV/OpWeights.ml b/riscV/OpWeights.ml index 0a1d9ad4..a5ece6d5 100644 --- a/riscV/OpWeights.ml +++ b/riscV/OpWeights.ml @@ -66,7 +66,8 @@ module Rocket = struct | OEmayundef _ -> 0 | _ -> 1 - let resources_of_op (op : operation) (nargs : int) = resource_bounds + let resources_of_op (op : operation) (nargs : int) = + match op with OEmayundef _ -> [| 0 |] | _ -> resource_bounds let non_pipelined_resources_of_op (op : operation) (nargs : int) = match op with |