aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'powerpc')
-rw-r--r--powerpc/Machregsaux.ml4
-rw-r--r--powerpc/Machregsaux.mli2
2 files changed, 3 insertions, 3 deletions
diff --git a/powerpc/Machregsaux.ml b/powerpc/Machregsaux.ml
index 8c3017ff..664f71a0 100644
--- a/powerpc/Machregsaux.ml
+++ b/powerpc/Machregsaux.ml
@@ -22,13 +22,13 @@ let _ =
(fun (s, r) -> Hashtbl.add register_names r (camlstring_of_coqstring s))
Machregs.register_names
-let scratch_register_names = [ "R0" ]
+let is_scratch_register s = s = "R0" || s = "r0"
let name_of_register r =
try Some (Hashtbl.find register_names r) with Not_found -> None
let register_by_name s =
- Machregs.register_by_name (coqstring_of_camlstring (String.uppercase s))
+ Machregs.register_by_name (coqstring_uppercase_ascii_of_camlstring s)
let can_reserve_register r =
List.mem r Conventions1.int_callee_save_regs
diff --git a/powerpc/Machregsaux.mli b/powerpc/Machregsaux.mli
index d4877a62..9404568d 100644
--- a/powerpc/Machregsaux.mli
+++ b/powerpc/Machregsaux.mli
@@ -14,5 +14,5 @@
val name_of_register: Machregs.mreg -> string option
val register_by_name: string -> Machregs.mreg option
-val scratch_register_names: string list
+val is_scratch_register: string -> bool
val can_reserve_register: Machregs.mreg -> bool