aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc/TargetPrinter.ml
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2015-03-27 15:28:20 +0100
committerXavier Leroy <xavier.leroy@inria.fr>2015-03-27 15:28:20 +0100
commite11b3b885a6d359925b86743b89698cc6757157a (patch)
tree4729067203418873c940aa27d45085ca9881905d /powerpc/TargetPrinter.ml
parent33b742bb41725e47bd88dc12f2a4f40173023f83 (diff)
downloadcompcert-e11b3b885a6d359925b86743b89698cc6757157a.tar.gz
compcert-e11b3b885a6d359925b86743b89698cc6757157a.zip
Updating the PowerPC and ARM ports.
PowerPC: always use full register names to print annotations.
Diffstat (limited to 'powerpc/TargetPrinter.ml')
-rw-r--r--powerpc/TargetPrinter.ml7
1 files changed, 5 insertions, 2 deletions
diff --git a/powerpc/TargetPrinter.ml b/powerpc/TargetPrinter.ml
index 70aec6c0..7e460f46 100644
--- a/powerpc/TargetPrinter.ml
+++ b/powerpc/TargetPrinter.ml
@@ -234,9 +234,12 @@ module Target (System : SYSTEM):TARGET =
let ireg_or_zero oc r =
if r = GPR0 then output_string oc "0" else ireg oc r
+ (* [preg] is only used for printing annotations.
+ Use the full register names [rN] and [fN] to avoid
+ ambiguity with constants. *)
let preg oc = function
- | IR r -> ireg oc r
- | FR r -> freg oc r
+ | IR r -> fprintf oc "r%s" (int_reg_name r)
+ | FR r -> fprintf oc "f%s" (float_reg_name r)
| _ -> assert false
let section oc sec =