Code: Select all
float fmac(float a, float b, float c) {
return a * b + c;
}Code: Select all
fmac(float, float, float):
fmadd.s fa0,fa0,fa1,fa2 #do the multiply-accumulate
ret
ESP32-S3:
Code: Select all
fmac(float, float, float):
entry sp, 32
wfr f1, a2 #copy integer reg to FPU reg
wfr f0, a4 #copy integer reg to FPU reg
wfr f2, a3 #copy integer reg to FPU reg
madd.s f0, f1, f2 #do the multiply-accumulate
rfr a2, f0 #copy FPU reg to integer reg
retw.n
On a related note, can Espressif mention if future chips will use Xtensa, or if the future is RISC-V for ESP32s?
