aboutsummaryrefslogtreecommitdiffstats
path: root/x86/Machregsaux.ml
diff options
context:
space:
mode:
Diffstat (limited to 'x86/Machregsaux.ml')
-rw-r--r--x86/Machregsaux.ml9
1 files changed, 7 insertions, 2 deletions
diff --git a/x86/Machregsaux.ml b/x86/Machregsaux.ml
index 473e0602..80066b00 100644
--- a/x86/Machregsaux.ml
+++ b/x86/Machregsaux.ml
@@ -14,9 +14,9 @@
open Camlcoq
open Machregs
-
+
let register_names : (mreg, string) Hashtbl.t = Hashtbl.create 31
-
+
let _ =
List.iter
(fun (s, r) -> Hashtbl.add register_names r (camlstring_of_coqstring s))
@@ -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