box64 icon indicating copy to clipboard operation
box64 copied to clipboard

About emulating AVX instructions on RISC-V

Open zohanzephyr opened this issue 1 year ago • 4 comments

Now that RISC-V dynarec supports vector instructions, will AVX be emulated with scalar instructions?

zohanzephyr avatar Sep 26 '24 06:09 zohanzephyr

We need to refine current RVV support, add MMX support for RVV, and add xtheadvector support... so AVX will come after.

ksco avatar Sep 26 '24 06:09 ksco

We need to refine current RVV support, add MMX support for RVV, and add xtheadvector support... so AVX will come after.

Will that be followed up by emulating AVX with RISC-V scalar instructions? Isn't it enough to use RVV

zohanzephyr avatar Sep 26 '24 07:09 zohanzephyr

There is always the interpreter when opcodes are not implemented in the dynarec.

Idealy, the dynarec would run on all CPU, so scalar as a minimum, rvv/xthreadvector if available. But it's a mater of time/work. It's still a lot of work to implement all those opcodes.

What are you interested in with AVX emulation @zohanzephyr ?

ptitSeb avatar Sep 26 '24 08:09 ptitSeb

There is always the interpreter when opcodes are not implemented in the dynarec.

Idealy, the dynarec would run on all CPU, so scalar as a minimum, rvv/xthreadvector if available. But it's a mater of time/work. It's still a lot of work to implement all those opcodes.

What are you interested in with AVX emulation @zohanzephyr ?

I noticed that an application I was running utilized AVX instructions, so I'm interested in learning more about this and any related future plans.

zohanzephyr avatar Sep 26 '24 08:09 zohanzephyr

AVX for RISC-V is mostly implemented now.

https://github.com/ptitSeb/box64/releases/tag/v0.3.8

LukeShortCloud avatar Oct 24 '25 22:10 LukeShortCloud