hashstp
Hash Store Privileged
Privileged version of hash store.
Details
The hashstp instruction stores a doubleword into memory at an effective address calculated from registers RA and RB, using a privileged operation. It checks if the stored value matches a previously computed hash; if not, it triggers a trap.
Pseudocode Operation
DW ←32×DX + D
d ←EXTS(0b111_1111 || DW || 0b000)
EA ←(RA) + d
temp ←HashDigest((RA),(RB),(HASHPKEYR))
temp1 ←MEM(EA, 8)
if (temp ≠ temp1) then TRAP
Programming Note
The hashstp instruction is used for storing a doubleword into memory while verifying its integrity against a previously computed hash. It requires privileged access and must be executed in a context where the MSR register allows such operations. Ensure that the effective address (EA) is correctly calculated and aligned to avoid exceptions. If the stored value does not match the expected hash, a trap will occur, necessitating proper error handling.
Example
Encoding
Operands
-
RA
Address