icbi
Instruction Cache Block Invalidate
Invalidates the instruction cache block associated with the address. Critical for self-modifying code or JITs.
Details
The icbi instruction invalidates a block of the instruction cache. This means that any previously cached instructions in that block are discarded, and subsequent fetches for those instructions will reload them from memory.
Pseudocode Operation
InvalidateICache(EffectiveAddr(RA, RB))
Programming Note
Use icbi to ensure that changes to executable code in memory are reflected in the instruction cache. This is crucial after modifying code at runtime. Ensure the address is properly aligned; typically, block boundaries align with cache line sizes. This instruction operates at user privilege level and may raise an exception if the address is invalid or access is denied.
Example
Encoding
Operands
-
RA
Base Address -
RB
Index Address