prfb

PRFB <prfop>, <Pg>, [<Xn|SP>, <Zm>.S, <mod>]

Prefetch Gather (Byte)

Pseudocode Operation

No pseudocode available.

Encoding

Binary Layout
100001000
31:23
xs
22
1
21
Zm
20:16
0
15
0
14
0
13
Pg
12:10
Rn
9:5
0
4
prfop
3:0
 
Format SVE
Opcode 0x84200000
Extension SVE

Related

More in SVE

Reference

Instruction Forms

Encoding Instruction ISA Bit pattern
0x8400E000 PRFB <prfop>, <Pg>, [<Zn>.S{, #<imm>}] A64 1000010 | 0 | 0 | 00 | imm5 | 111 | Pg | Zn | 0 | prfop
0xC400E000 PRFB <prfop>, <Pg>, [<Zn>.D{, #<imm>}] A64 1100010 | 0 | 0 | 00 | imm5 | 111 | Pg | Zn | 0 | prfop
0x85C00000 PRFB <prfop>, <Pg>, [<Xn|SP>{, #<imm>, MUL VL}] A64 1000010111 | imm6 | 0 | 0 | 0 | Pg | Rn | 0 | prfop
0x8400C000 PRFB <prfop>, <Pg>, [<Xn|SP>, <Xm>] A64 1000010 | 0 | 0 | 00 | Rm | 110 | Pg | Rn | 0 | prfop
0x84200000 PRFB <prfop>, <Pg>, [<Xn|SP>, <Zm>.S, <mod>] A64 100001000 | xs | 1 | Zm | 0 | 0 | 0 | Pg | Rn | 0 | prfop
0xC4200000 PRFB <prfop>, <Pg>, [<Xn|SP>, <Zm>.D, <mod>] A64 110001000 | xs | 1 | Zm | 0 | 0 | 0 | Pg | Rn | 0 | prfop
0xC4608000 PRFB <prfop>, <Pg>, [<Xn|SP>, <Zm>.D] A64 11000100011 | Zm | 1 | 0 | 0 | Pg | Rn | 0 | prfop

Description

Gather prefetch of bytes from the active memory addresses generated by a 64-bit scalar base plus vector index. The index values are optionally sign or zero-extended from 32 to 64 bits. Inactive addresses are not prefetched from memory. The <prfop> symbol specifies the prefetch hint as a combination of three options: access type PLD for load or PST for store; target cache level L1, L2 or L3; temporality (KEEP for temporal or STRM for non-temporal). This instruction is illegal when executed in Streaming SVE mode, unless FEAT_SME_FA64 is implemented and enabled.

Operation

CheckNonStreamingSVEEnabled();
constant integer VL = CurrentVL;
constant integer PL = VL DIV 8;
constant integer elements = VL DIV esize;
bits(PL) mask = P[g, PL];
bits(64) base;
bits(VL) offset;

if AnyActiveElement(mask, esize) then
    base = if n == 31 then SP[] else X[n, 64];
    offset = Z[m, VL];

for e = 0 to elements-1
    if ActivePredicateElement(mask, e, esize) then
        integer off = Int(Elem[offset, e, esize]<offs_size-1:0>, offs_unsigned);
        bits(64) addr = base + (off << scale);
        Hint_Prefetch(addr, pref_hint, level, stream);