(no commit message)
authorlkcl <lkcl@web>
Sat, 29 Apr 2023 13:00:02 +0000 (14:00 +0100)
committerIkiWiki <ikiwiki.info>
Sat, 29 Apr 2023 13:00:02 +0000 (14:00 +0100)
openpower/sv/twin_butterfly.mdwn

index 69fde8b5d97af6023ae21f3b193472f615ee30ce..cf3d0e645e67434b739d5645f0804b7cf8bef37c 100644 (file)
@@ -52,7 +52,7 @@ A-Form
 
 ```
     |0     |6     |11      |16     |21      |26    |31 |
-    | PO   |  RT  |   RA   |   RB  |   SH   |   XO | |
+    | PO   |  RT  |   RA   |   RB  |   SH   |   XO |Rc |
 
 ```
 
@@ -79,6 +79,15 @@ Pseudo-code:
     RS <- (res2 & m | smask2) + s64_2
 ```
 
+Note that if Rc=1 an Illegal Instruction is raised.
+Rc=1 is `RESERVED`
+
+Similar to `RTp`, this instruction produces an implicit result,
+`RS`, which under Scalar circumstances is defined as `RT+1`.
+For SVP64 if `RT` is a Vector, `RS` begins immediately after the
+Vector `RT` where the length of `RT` is set by `SVSTATE.MAXVL`
+(Max Vector Length).
+
 Special Registers Altered:
 
 ```
@@ -95,7 +104,7 @@ X-Form
 
 ```
     |0     |6     |11      |16     |21      |31 |
-    | PO   |  FRT |  FRA   |  FRB  |   XO   | |
+    | PO   |  FRT |  FRA   |  FRB  |   XO   |Rc |
 ```
 
 * fdmadds FRT,FRA,FRB (Rc=0)
@@ -108,6 +117,28 @@ Pseudo-code:
     FRT <- FPMUL32(FRA, sub)
 ```
 
+The Floating-Point operand in register FRT is added to the floating-point
+operand in register FRB and the result stored in FRS.
+
+Using the exact same operand input register values from FRT and FRB that
+were used to create FRS, the Floating-Point operand in register 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 subtraction and multiply are treated as if they were `fsub`
+followed by `fmul`, not `fmsub`.  The creation of FRS and FRT are
+treated as parallel independent operations.
+
+Note that if Rc=1 an Illegal Instruction is raised.
+Rc=1 is `RESERVED`
+
+Similar to `FRTp`, this instruction produces an implicit result,
+`FRS`, which under Scalar circumstances is defined as `FRT+1`.
+For SVP64 if `FRT` is a Vector, `FRS` begins immediately after the
+Vector `FRT` where the length of `FRT` is set by `SVSTATE.MAXVL`
+(Max Vector Length).
+
 Special Registers Altered:
 
 ```
@@ -124,7 +155,7 @@ X-Form
 
 ```
     |0     |6     |11      |16     |21      |31 |
-    | PO   |  FRT |  FRA   |  FRB  |   XO   | |
+    | PO   |  FRT |  FRA   |  FRB  |   XO   |Rc |
 ```
 
 * ffmadds FRT,FRA,FRB (Rc=0)
@@ -136,6 +167,44 @@ Pseudo-code:
     FRT <- FPMULADD32(FRT, FRA, FRB, 1, 1)
 ```
 
+The two operations
+
+```
+    FRS <-\90 -([(FRT) * \97(FRA)] - (FRB))
+    FRT <-\90   [(FRT) * \97(FRA)] + (FRB)
+```
+
+are performed.
+
+The floating-point operand in register FRT is multiplied
+by the floating-point operand in register FRA. The float-
+ing-point operand in register FRB is added to
+this intermediate result, and the intermediate stored in FRS.
+
+Using the exact same values of FRT, FRT and FRB as used to create FRS,
+the floating-point operand in register FRT is multiplied
+by the floating-point operand in register FRA. The float-
+ing-point operand in register FRB is subtracted from
+this intermediate result, and the intermediate stored in FRT.
+
+FRT is created as if
+a `fmadds` operation had been performed. FRS is created as if
+a `fnmsubs` operation had simultaneously been performed with
+the exact same register operands, in parallel, independently,
+at exactly the same time.
+
+FRT is a Read-Modify-Write operation.  
+
+Note that if Rc=1 an Illegal Instruction is raised.
+Rc=1 is `RESERVED`
+
+Similar to `FRTp`, this instruction produces an implicit result,
+`FRS`, which under Scalar circumstances is defined as `FRT+1`.
+For SVP64 if `FRT` is a Vector, `FRS` begins immediately after the
+Vector `FRT` where the length of `FRT` is set by `SVSTATE.MAXVL`
+(Max Vector Length).
+
+
 Special Registers Altered:
 
 ```