alternative table definition for [[sv/svp64]] `RM.MODE`. The following
modes make sense:
-* saturation
* simple (no augmentation)
* Fault-first (where Vector Indexed is banned)
* Data-dependent Fail-First (extremely useful for Linked-List pointer-chasing)
* **zz**: both sz and dz are set equal to this flag.
* **inv CR bit** just as in branches (BO) these bits allow testing of
a CR bit and whether it is set (inv=0) or unset (inv=1)
-* **N** sets signed/unsigned saturation.
* **RC1** as if Rc=1, stores CRs *but not the result*
* **SEA** - Signed Effective Address, if enabled performs sign-extension on
registers that have been reduced due to elwidth overrides
| 0 | 1 | 2 | 3 4 | description |
|---|---| --- |---------|--------------------------- |
-| 0 | 0 | 0 | zz els | simple mode |
-| 0 | 0 | 1 | PI LF | post-increment and Fault-First |
-| 1 | 0 | N | zz els | sat mode: N=0/1 u/s |
+|els| 0 | PI | zz LF | post-increment and Fault-First |
|VLi| 1 | inv | CR-bit | ffirst CR sel |
The `els` bit is only relevant when `RA.isvec` is clear: this indicates
Signed Effective Address computation is only relevant for Vector Indexed
Mode, when elwidth overrides are applied. The source override applies to
RB, and before adding to RA in order to calculate the Effective Address,
-if SEA is set RB is sign-extended from elwidth bits to the full 64 bits.
-For other Modes (ffirst, saturate), all EA computation with elwidth
-overrides is unsigned. RA is *not* altered (not truncated)
+if SEA is set then RB is sign-extended from elwidth bits to the full 64 bits.
+For other Modes (ffirst), all EA computation with elwidth
+overrides is unsigned. RA is *never* altered (not truncated)
by element-width overrides.
Note that cache-inhibited LD/ST when VSPLAT is activated will perform
but (on Indexed Load) allow srcwidth overrides on RB
* Load at the operation width (lb/lh/lw/ld) as usual
* byte-reversal as usual
-* Non-saturated mode:
- - zero-extension or truncation from operation width to dest elwidth
- - place result in destination at dest elwidth
-* Saturated mode:
- - Sign-extension or truncation from operation width to dest width
- - signed/unsigned saturation down to dest elwidth
+* zero-extension or truncation from operation width to dest elwidth
+* place result in destination at dest elwidth
In order to respect Power v3.0B Scalar behaviour the memory side
is treated effectively as completely separate and distinct from SV
Immediate and Indexed LD/ST, does not have element-width overriding
applied to it.
-Note that predication, predication-zeroing, and other modes except
-saturation have all been removed, for clarity and simplicity:
+Note that predication, predication-zeroing, and other modes
+have all been removed, for clarity and simplicity:
```
# LD not VLD!
# read the underlying memory
memread <= MEM(srcbase + imm_offs, op_width)
- # check saturation.
- if svpctx.saturation_mode:
- # ... saturation adjustment...
- memread = clamp(memread, op_width, svctx.dest_elwidth)
- else:
- # truncate/extend to over-ridden dest width.
- memread = adjust_wid(memread, op_width, svctx.dest_elwidth)
+ # truncate/extend to over-ridden dest width.
+ memread = adjust_wid(memread, op_width, svctx.dest_elwidth)
# takes care of inserting memory-read (now correctly byteswapped)
# into regfile underlying LE-defined order, into the right place
For LD/Indexed, the key is that in the calculation of the Effective Address,
RA has no elwidth override but RB does. Pseudocode below is simplified
-for clarity: predication and all modes except saturation are removed:
+for clarity: predication and all modes are removed:
```
# LD not VLD! ld*rx if brev else ld*
if (bytereverse):
memread = byteswap(memread, op_width)
- if svpctx.saturation_mode:
- # ... saturation adjustment...
- memread = clamp(memread, op_width, svctx.dest_elwidth)
- else:
- # truncate/extend to over-ridden dest width.
- memread = adjust_wid(memread, op_width, svctx.dest_elwidth)
+ # truncate/extend to over-ridden dest width.
+ memread = adjust_wid(memread, op_width, svctx.dest_elwidth)
# takes care of inserting memory-read (now correctly byteswapped)
# into regfile underlying LE-defined order, into the right place