hashst

Hash Store

hashst RA

Stores the computed doubleword hash value to a doubleword storage location.

Encoding

Binary Layout
0
0:5
D
6:10
RA
11:15
RB
16:20
DX
21:25
754
26:31
 
Format X-form
Opcode 0x7C0005A4
Extension Base

Operands

  • RA
    Address
  • RB
    Source General Purpose Register
  • offset
    Offset to be added to the base address in RA
  • offset
    Offset to be added to the base address in RB

Example

hashst r4

Registers Altered

HASHKEYR

Related

More in Base

Reference

Description

Computes and stores a 64-bit hash value derived from the contents at the memory address RA. The hash is calculated based on the address and associated data, then written to the doubleword storage location at RA. This is a privileged instruction used for Return-Oriented Programming (ROP) protection.

Operation

hash_addr ← RA
hash_value ← ComputeHash(hash_addr)
[hash_addr] ← hash_value

Programming Note

The EA specified by the Hash instructions - (RA) + EXTS(0b111_1111 || DW || 0b000) - can be expressed as (RA) -(64-DW)×8. Therefore the Hash instructions can only access one of the 64 doublewords preceding the address provided by RA.