Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposed bugfix for issue #436 #437

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion riscV/Asm.v
Original file line number Diff line number Diff line change
Expand Up @@ -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 =>
Expand Down
3 changes: 2 additions & 1 deletion riscV/Asmgenproof.v
Original file line number Diff line number Diff line change
Expand Up @@ -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 *)
Expand Down
2 changes: 1 addition & 1 deletion riscV/TargetPrinter.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand Down