diff --git a/riscV/Asm.v b/riscV/Asm.v index a47573a2bd..2346e7aac0 100644 --- a/riscV/Asm.v +++ b/riscV/Asm.v @@ -751,7 +751,9 @@ Definition exec_instr (f: function) (i: instruction) (rs: regset) (m: mem) : out | Pj_l l => goto_label f l rs m | Pj_s s sg => - Next (rs#PC <- (Genv.symbol_address ge s Ptrofs.zero)) m + Next (rs#PC <- (Genv.symbol_address ge s Ptrofs.zero) + #X31 <- Vundef + ) m | Pj_r r sg => Next (rs#PC <- (rs#r)) m | Pjal_s s sg => diff --git a/riscV/Asmgenproof.v b/riscV/Asmgenproof.v index 798dad9f6d..520341324a 100644 --- a/riscV/Asmgenproof.v +++ b/riscV/Asmgenproof.v @@ -815,7 +815,8 @@ Local Transparent destroyed_by_op. traceEq. (* match states *) econstructor; eauto. - apply agree_set_other; auto with asmgen. + eapply agree_exten; eauto. intros. + Simpl. Simpl. unfold Genv.symbol_address. rewrite symbols_preserved. rewrite H. auto. - (* Mbuiltin *) diff --git a/riscV/TargetPrinter.ml b/riscV/TargetPrinter.ml index d8137f84dc..0bb45d99aa 100644 --- a/riscV/TargetPrinter.ml +++ b/riscV/TargetPrinter.ml @@ -320,7 +320,7 @@ module Target : TARGET = | Pj_l(l) -> fprintf oc " j %a\n" print_label l | Pj_s(s, sg) -> - fprintf oc " j %a\n" symbol s + fprintf oc " jump %a, x31\n" symbol s | Pj_r(r, sg) -> fprintf oc " jr %a\n" ireg r | Pjal_s(s, sg) ->