Are programs compiled for RV32E gauranteed to produce equivalent results on RV32I machines?

48 views
Skip to first unread message

Ahmed Kahlaz

unread,
Dec 31, 2024, 8:55:49 AM12/31/24
to RISC-V SW Dev

The following is the only info I could find:

RV32E and RV64E use the same instruction-set encoding as RV32I and RV64I respectively, except that only registers x0–x15 are provided. All encodings specifying the other registers x16–x31 are reserved.

This change requires a different calling convention and ABI. In particular, RV32E is only used with a soft-float calling convention. A new embedded ABI is under consideration that would work across RV32E and RV32I.

To be uber specific, my concern is the ability to compile programs which will run on a RV32I machine but which will only utilize the first 16 registers - hence the rationale to compile for RV32E. The reasoning for this is to support more performant translation to 16-register x86 CPUs running the RV32I VM.

To be even more specific to my own concerns, I have no interest in implementing any native float operations.

If RV32E programs ran on a RV32I machine will produce less deterministic results, I would like to be aware.

Christoph Müllner

unread,
Jan 7, 2025, 1:32:58 PMJan 7
to Ahmed Kahlaz, RISC-V SW Dev
On Tue, Dec 31, 2024 at 2:55 PM Ahmed Kahlaz <mattwil...@gmail.com> wrote:
>
> https://stackoverflow.com/questions/79313220/are-programs-compiled-for-rv32e-gauranteed-to-produce-equivalent-results-on-rv32

Your question was answered there three days before you reposted your
question here.
Is there anything in particular missing or unclear in that answer,
which you want to bring up here?
Reply all
Reply to author
Forward
0 new messages