Paired-single instructions
Those operations involve treating FPRs, who are 64-bit wide registers, as two 32-bit values.
| FPR |
FPR value |
FPR(ps0) |
FPR(ps1) |
f0 |
0xde10203040506070
| 0xde102030 |
0x40506070 |
f1 |
0xcc11223344556677 |
0xcc112233 |
0x44556677 |
| ... |
... |
... |
... |
The newly introduced load/store instructions for paired singles make use of 8 new Graphic Quantization Registers.
| GQR |
GQR value |
gqrI |
..L_SCALE[I].....L_TYPE[I]..S_SCALE[I].....S_TYPE[I]
|
A GQR contains a scaling factor and a signed conversion type (one of
s8, u8, s16, u16, float) for each of loading and storing instructions. An example of a loading instruction for paired singles is:
psq_l frD, d(rA), W, I
is executed by performing:
let
nf(float) = 0, nf(t) = 1 otherwise
- if
W = 0 , frD(ps0), frD(ps1) will respectively contain:
*(L_TYPE[I]*)(d+rA) >> L_SCALE[I]*nf(L_TYPE[I])
*(L_TYPE[I]*)(d+rA+sizeof(L_TYPE[I])) >> L_SCALE[I]*nf(L_TYPE[I])
- if
W = 1 they will respectively contain:
*(L_TYPE[I]*)(d+rA) >> L_SCALE[I]*nf(L_TYPE[I])
1
This operation, where a value is casted by
L_TYPE and then divided by
2^L_SCALE is called
dequantization.
An operation called
quantization is used in store instructions, the difference being that the casted value is multiplied by
2^S_SCALE.