From 759322bfe0478197a1cf3ea708a4444809054598 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 29 Apr 2023 18:08:04 +0100 Subject: [PATCH] no, fdmadd(s) is definitely not the same as fmadd(s) --- openpower/sv/twin_butterfly.mdwn | 36 +++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/openpower/sv/twin_butterfly.mdwn b/openpower/sv/twin_butterfly.mdwn index 42c85c01f..1a17e9cdb 100644 --- a/openpower/sv/twin_butterfly.mdwn +++ b/openpower/sv/twin_butterfly.mdwn @@ -144,9 +144,19 @@ Pseudo-code: ``` FRS <- FPADD32(FRT, FRB) - FRT <- FPMULADD32(FRT, FRA, FRB, 1, -1) + sub <- FPSUB32(FRT, FRB) + FRT <- FPMUL32(FRA, sub) ``` +The two IEEE754-FP32 operations + +``` + FRS <- [(FRT) + (FRB)] + FRT <- [(FRT) - (FRB)] * (FRA) +``` + +are simultaneously performed. + The Floating-Point operand in register FRT is added to the floating-point operand in register FRB and the result stored in FRS. @@ -156,9 +166,10 @@ FRB is subtracted from the floating-point operand in register FRT and the result then multiplied by FRA to create an intermediate result that is stored in FRT. -The add into FRS is treated exactly as `fadd`. The creation of the -result FRT is exact!y that of `fmsub`. The creation of FRS and FRT are -treated as parallel independent operations which occur at the same time. +The add into FRS is treated exactly as `fadds`. The creation of the +result FRT is **not** the same as that of `fmsubs`. +The creation of FRS and FRT are treated as parallel independent operations +which occur at the same time. Note that if Rc=1 an Illegal Instruction is raised. Rc=1 is `RESERVED` @@ -256,9 +267,19 @@ Pseudo-code: ``` FRS <- FPADD64(FRT, FRB) - FRT <- FPMULADD64(FRT, FRA, FRB, 1, -1) + sub <- FPSUB64(FRT, FRB) + FRT <- FPMUL64(FRA, sub) ``` +The two IEEE754-FP64 operations + +``` + FRS <- [(FRT) + (FRB)] + FRT <- [(FRT) - (FRB)] * (FRA) +``` + +are simultaneously performed. + The Floating-Point operand in register FRT is added to the floating-point operand in register FRB and the result stored in FRS. @@ -269,8 +290,9 @@ the result then multiplied by FRA to create an intermediate result that is stored in FRT. The add into FRS is treated exactly as `fadd`. The creation of the -result FRT is exact!y that of `fmsub`. The creation of FRS and FRT are -treated as parallel independent operations which occur at the same time. +result FRT is **not** the same as that of `fmsub`. +The creation of FRS and FRT are treated as parallel independent operations +which occur at the same time. Note that if Rc=1 an Illegal Instruction is raised. Rc=1 is `RESERVED` -- 2.30.2