Copies modified cache blocks to main storage and invalidates the copy in the data cache.
Note: The dcbf instruction is supported only in the PowerPC architecture.
Bits | Value |
---|---|
0-5 | 31 |
6-10 | /// |
11-15 | RA |
16-20 | RB |
21-30 | 86 |
31 | / |
PowerPC | |
---|---|
dcbf | RA, RB |
The dcbf instruction calculates an effective address (EA) by adding the contents of general-purpose register (GPR) RA to the contents of GPR RB. If the RA field is 0, EA is the sum of the contents of RB and 0. If the cache block containing the target storage locations is in the data cache, it is copied back to main storage, provided it is different than the main storage copy.
Consider the following when using the dcbf instruction:
The dcbf instruction has one syntax form and does not effect the Fixed-Point Exception Register.
RA | Specifies the source general-purpose register for operation. |
RB | Specifies the source general-purpose register for operation. |
The software manages the coherency of storage shared by the processor and another system component, such as an I/O device that does not participate in the storage coherency protocol. The following code flushes the shared storage from the data cache prior to allowing another system component access to the storage:
# Assume that the variable A is assigned to storage location # 0x0000 4540. # Assume that the storage location to which A is assigned # contains 0. # Assume that GPR 3 contains 0x0000 0040. # Assume that GPR 4 contains 0x0000 4500. # Assume that GPR 5 contains -1. st R5,R4,R3 # Store 0xFFFF FFFF to A dcbf R4,R3 # Flush A from cache to main memory sync # Ensure dcbf is complete. Start I/O # operation
After the store, but prior to the execution of the dcbf and sync instructions, the copy of A in the cache contains a -1. However, it is possible that the copy of A in main memory still contains 0. After the sync instruction completes, the location to which A is assigned in main memory contains -1 and the processor data cache no longer contains a copy of location A.
The clcs (Cache Line Compute Size) instruction, clf (Cache Line Flush) instruction, cli (Cache Line Invalidate) instruction, dcbi (Data Cache Block Invalidate) instruction, dcbst (Data Cache Block Store) instruction, dcbt (Data Cache Block Touch) instruction, dcbtst (Data Cache Block Touch for Store) instruction, dcbz or dclz (Data Cache Block Set to Zero) instruction, dclst (Data Cache Line Store) instruction, icbi (Instruction Cache Block Invalidate) instruction, sync (Synchronize) or dcs (Data Cache Synchronize) instruction.