1 # Example demonstration instruction modified to SVP64 (better)
4 Background: <https://bugs.libre-soc.org/show_bug.cgi?id=1056#c56>
7 The idea here is to review a modified version of a Power ISA 3
8 instruction definition, to add SVP64 in a completely non-disruptive
11 The proposal is therefore to add a clear alternative "Operand namespace",
12 which already has precedent from EXT1xx-Prefixed instructions.
16 a danger of even declaring the existence "`sv.addi RT,RA,SI`" is the
17 assumption that it is different from `addi RT,RA,SI`. Alternative
18 encodings that conflict with the Defined word-instruction (`addi`
19 in this case) are flat-out **prohibited** in SVP64.
21 **Vector/Scalar Operands**
23 another danger - this one a permutation-explosion - exists when
24 specifying which register operands are vector and which scalar:
25 they all are, and they all are, independently of each other.
31 * `sv.addi *RT,*RA,SI`
33 but this gets massively out of hand very quickly:
35 * `sv.fmadds FRT,FRA,FRB,FRC`
38 * `sv.fmadds *FRT,*FRA,*FRB,*FRC`
40 # SVP64-annotated addi instruction (prototype)
42 **Add Immediate** D-Form
47 Defined Word-instruction: D-Form
49 | 0 | 6 | 11 | 16 31 |
52 * pseudocode.RA <- `D-Form.RA`
53 * pseudocode.RT <- `D-Form.RT`
54 * pseudocode.SI <- `D-Form.SI`
56 **Prefixed Add Immediate** MLS:D-form
62 | 1 | 2 | 0 | // | R | // | si0 |
63 | 0 | 6 | 8 | 9 | 11 | 12 | 14 31 |
66 | 14 | RT | RA | si1 |
67 | 0 | 6 | 11 | 16 31 |
71 * pseudocode.RA <- `D-Form.RA`
72 * pseudocode.RT <- `D-Form.RT`
73 * pseudocode.SI <- `MLS.si0 || MLS.si1`
75 **Vectorized Add Immediate** SVP64-RM-1S1D/EXTRA3/Normal:D-form
80 Prefix: SVP64-RM-1S1D/EXTRA3/Normal
81 | 9 | .. | Stuff | EXTRA | MODEBITS |
82 | 0 | 6 | 8 | 17 26 | 27 31 |
83 Defined Word-instruction: D-Form
85 | 0 | 6 | 11 | 16 31 |
90 * pseudocode.RA <- `SVP64_EXTRA3_DECODE(D-Form.RA, SVP64.RM.EXTRA[0:2])`
91 * pseudocode.RT <- `SVP64_EXTRA3_DECODE(D-Form.RT, SVP64.RM.EXTRA[3:5])`
92 * pseudocode.SI <- `D-Form.SI`
98 RT <- (RA|0) + EXTS64(SI)
100 RT <- (RA|0) + EXTS64(si0||si1)
101 if "paddi" & R=1 then
102 RT <- CIA + EXTS64(si0||si1)
106 Special Registers Altered: