From bf21c2c43629ca47a2a34c47a01c4525a69a2ca6 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Thu, 8 Mar 2018 16:36:16 +0100 Subject: Print x2 for riscV stack pointer. x2 is the stack pointer of the riscV, both sp and x2 are supported but to be safe use x2 in annotations. Bug 23176 --- riscV/TargetPrinter.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'riscV') diff --git a/riscV/TargetPrinter.ml b/riscV/TargetPrinter.ml index 72b38bcd..e3fbfe36 100644 --- a/riscV/TargetPrinter.ml +++ b/riscV/TargetPrinter.ml @@ -568,11 +568,11 @@ module Target : TARGET = begin match ef with | EF_annot(kind,txt, targs) -> begin match (P.to_int kind) with - | 1 -> let annot = annot_text preg_annot "sp" (camlstring_of_coqstring txt) args in + | 1 -> let annot = annot_text preg_annot "x2" (camlstring_of_coqstring txt) args in fprintf oc "%s annotation: %S\n" comment annot | 2 -> let lbl = new_label () in fprintf oc "%a: " label lbl; - add_ais_annot lbl preg_annot "sp" (camlstring_of_coqstring txt) args + add_ais_annot lbl preg_annot "x2" (camlstring_of_coqstring txt) args | _ -> assert false end | EF_debug(kind, txt, targs) -> -- cgit