riscv-card icon indicating copy to clipboard operation
riscv-card copied to clipboard

Description of FNMADD and FNMSUB is swapped

Open vineetgarc opened this issue 2 years ago • 0 comments

Per ISA spec:

FNMSUB.S multiplies the values in rs1 and rs2, negates the product, adds the value in rs3, and writes the final result to rd. FNMSUB.S computes -(rs1×rs2)+rs3. FNMADD.S multiplies the values in rs1 and rs2, negates the product, subtracts the value in rs3, and writes the final result to rd. FNMADD.S computes -(rs1×rs2)-rs3. .. The FNMSUB and FNMADD instructions are counterintuitively named, owing to the naming of the corresponding instructions in MIPS-IV.

vineetgarc avatar Jun 16 '22 23:06 vineetgarc