riscv / sail-riscv

Sail RISC-V model
https://lists.riscv.org/g/tech-golden-model
Other
435 stars 160 forks source link

Many compilation warnings in OCaml emulator: ignored-partial-application #507

Open Kakadu opened 3 months ago

Kakadu commented 3 months ago

The CI version builds OCaml emulator with a lot of warnings. The most severe of them is

File "riscv.ml", line 12439, characters 4-48:
12439 |     Softfloat.f64_round_to_int (zrm, zv, zexact);
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning 5 [ignored-partial-application]: this function application is partial,
maybe some arguments are missing.

The compiler says that this function is not really called, and extra argument(s) seems to be forgotten. This means that correctness of the emulator could be in danger.

P.S. I couldn't find mentions about this neither here nor in https://github.com/rems-project/sail/issues . Maybe I should cross-post...

Timmmm commented 3 months ago

Yeah I noticed this too. The OCaml emulator doesn't actually support float currently anyway so it's probably not a big deal. This will change when the float implementation is moved from Berkeley softfloat to native Sail, which which case these functions will be deleted anyway.