aboutsummaryrefslogtreecommitdiffstats
path: root/riscV/Machregsaux.ml
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-21 22:39:27 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-21 22:39:27 +0100
commit23fa2a18e015b9d330ad6f1f08cf50adf90bd80b (patch)
treee3e39eebc5164b967db9b16504bfe19edc4d2bdc /riscV/Machregsaux.ml
parentab5528fb4caf637a0c7014d943302198079e7c20 (diff)
downloadcompcert-kvx-23fa2a18e015b9d330ad6f1f08cf50adf90bd80b.tar.gz
compcert-kvx-23fa2a18e015b9d330ad6f1f08cf50adf90bd80b.zip
try to be portable across archs
Diffstat (limited to 'riscV/Machregsaux.ml')
-rw-r--r--riscV/Machregsaux.ml5
1 files changed, 5 insertions, 0 deletions
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