Paris Oplopoios
unread,Jul 3, 2025, 11:45:18 AMJul 3Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to RISC-V ISA Dev
Hello,
Emulating x86 or AArch64 on RISC-V requires emulating the flags using multiple instructions. While zero, negative and carry flags can be calculated in one or two instructions, this isn't the case with the overflow flag.
It would be helpful to be able to do the calculation in a single instruction.
For example, instructions like these (placeholder names):
ofadd t1, t2, t3 would set t1 to 1 if t2 + t3 overflows, 0 otherwise
ofsub t1, t2, t3 would set t1 to 1 if t2 - t3 overflows, 0 otherwise
Seeing that RISC-V has an extension group "J" for JIT acceleration extensions, this could be helpful for recompiling x86 or AArch64 to RISC-V