Does PACKH access memory?
No. It concatenates low fields from rs1 and rs2 into rd, without a table lookup.
pack low bytes (Zbkb).
RV32/RV64 Zbkb 1.0; syntax packh rd, rs1, rs2, selecting integer x0–x31 or ABI names, with no immediate.
32-bit R-type: funct7=0000100, funct3=111, opcode=0110011.
rd[15:0] concatenates rs2[7:0] above rs1[7:0], zero-extending all upper bits.
Read sources before writeback; equal sources have one old value, x0 sources are zero, and rd=x0 discards writeback. No memory access occurs.
PACKH (Zbkb) places the low byte of rs1 into rd[7:0], the low byte of rs2 into rd[15:8], and clears all remaining high bits of rd. It does not pack the high halves of the source registers.
Shows only specification-defined encodings, conditions, and architectural state; it does not model pipelines, cache coherence, or platform policy.
PACKH (Zbkb) places the low byte of rs1 into rd[7:0], the low byte of rs2 into rd[15:8], and clears all remaining high bits of rd. It does not pack the high halves of the source registers.
Assume RV64 Zbkb, a1=0x1122334455667788 and a2=0x99AABBCCDDEEFF80; packh a0, a1, a2 produces a0=0x0000000000008088, leaving sources and memory unchanged.
Assume RV64 Zbkb, a1=0x1122334455667788 and a2=0x99AABBCCDDEEFF80; packh a0, a1, a2 produces a0=0x0000000000008088, leaving sources and memory unchanged.
No. It concatenates low fields from rs1 and rs2 into rd, without a table lookup.
It belongs to the Zbkb cryptographic bit-manipulation extension.