From 23fa2a18e015b9d330ad6f1f08cf50adf90bd80b Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Thu, 21 Mar 2019 22:39:27 +0100 Subject: try to be portable across archs --- riscV/Machregsaux.ml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'riscV/Machregsaux.ml') diff --git a/riscV/Machregsaux.ml b/riscV/Machregsaux.ml index 473e0602..07097eaf 100644 --- a/riscV/Machregsaux.ml +++ b/riscV/Machregsaux.ml @@ -31,3 +31,8 @@ let register_by_name s = Machregs.register_by_name (coqstring_uppercase_ascii_of_camlstring s) let can_reserve_register r = Conventions1.is_callee_save r + +let class_of_type = function + | AST.Tint | AST.Tlong -> 0 + | AST.Tfloat | AST.Tsingle -> 1 + | AST.Tany32 | AST.Tany64 -> assert false -- cgit