llvm-project
4e3266fb - [RISCV] Implement load/store support for XAndesBFHCvt (#150350)

Commit
67 days ago
[RISCV] Implement load/store support for XAndesBFHCvt (#150350) We use `lh` to load 2 bytes from memory into a gpr, then mask this gpr with -65536 to emulate nan-boxing behavior, and then the value in gpr is moved to fpr using `fmv.w.x`. To move the value back from fpr to gpr, we use `fmv.x.w` and finally, `sh` is used to store the lower 2 bytes back to memory. If zfh is enabled at the same time, we can just use flh/fsw to load/store bf16 directly.
Author
Parents
Loading