aboutsummaryrefslogtreecommitdiffstats
path: root/ia32/Machregsaux.ml
diff options
context:
space:
mode:
Diffstat (limited to 'ia32/Machregsaux.ml')
-rw-r--r--ia32/Machregsaux.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/ia32/Machregsaux.ml b/ia32/Machregsaux.ml
index 3083cf3e..75fd588a 100644
--- a/ia32/Machregsaux.ml
+++ b/ia32/Machregsaux.ml
@@ -38,3 +38,10 @@ let can_reserve_register r =
List.mem r Conventions1.int_callee_save_regs
|| List.mem r Conventions1.float_callee_save_regs
+let mregs_of_clobber idl =
+ List.fold_left
+ (fun l c ->
+ match register_by_name (Camlcoq.extern_atom c) with
+ | Some r -> r :: l
+ | None -> l)
+ [] idl