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

Fix destroyed_at_c_call on RISC-V #10349

Merged
merged 2 commits into from
Apr 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ Working version
- #10244: Optimise Int32.unsigned_to_int
(Fabian Hemmer, review by Stephen Dolan and Xavier Leroy)

- #10349: Fix destroyed_at_c_call on RISC-V
(Mark Shinwell, review by Nicolás Ojeda Bär)

### Type system:

* #10081: Typecheck `x |> f` and `f @@ x` as `(f x)`
Expand Down
5 changes: 3 additions & 2 deletions asmcomp/riscv/proc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,10 @@ let regs_are_volatile _ = false
(* Registers destroyed by operations *)

let destroyed_at_c_call =
(* s0-s11 and fs0-fs11 are callee-save *)
(* s0-s11 and fs0-fs11 are callee-save. However s2 needs to be in this
list since it is clobbered by caml_c_call itself. *)
Array.of_list(List.map phys_reg
[0; 1; 2; 3; 4; 5; 6; 7; 16; 17; 18; 19; 20; 22;
[0; 1; 2; 3; 4; 5; 6; 7; 8; 16; 17; 18; 19; 20; 22;
100; 101; 102; 103; 104; 105; 106; 107; 110; 111; 112; 113; 114; 115; 116;
117; 128; 129; 130; 131])

Expand Down