Does PACK access memory?
No. It concatenates low fields from rs1 and rs2 into rd, without a table lookup.
pack low halves (Zbkb).
RV32/RV64 Zbkb 1.0; syntax pack rd, rs1, rs2, selecting integer x0–x31 or ABI names, with no immediate.
32-bit R-type: funct7=0000100, funct3=100, opcode=0110011.
rd concatenates low XLEN/2 bits of rs2 above low XLEN/2 bits of rs1.
Read sources before writeback; equal sources have one old value, x0 sources are zero, and rd=x0 discards writeback. No memory access occurs.
PACK (Zbkb) places the low XLEN/2 bits of rs1 into the low half of rd and the low XLEN/2 bits of rs2 into the high half of rd. On RV32, rd[15:0]=rs1[15:0] and rd[31:16]=rs2[15:0]; on RV64, rd[31:0]=rs1[31:0] and rd[63:32]=rs2[31:0].
Shows only specification-defined encodings, conditions, and architectural state; it does not model pipelines, cache coherence, or platform policy.
PACK (Zbkb) places the low XLEN/2 bits of rs1 into the low half of rd and the low XLEN/2 bits of rs2 into the high half of rd. On RV32, rd[15:0]=rs1[15:0] and rd[31:16]=rs2[15:0]; on RV64, rd[31:0]=rs1[31:0] and rd[63:32]=rs2[31:0].
Assume RV64 Zbkb, a1=0x1122334455667788 and a2=0x99AABBCCDDEEFF80; pack a0, a1, a2 produces a0=0xDDEEFF8055667788, leaving sources and memory unchanged.
Assume RV64 Zbkb, a1=0x1122334455667788 and a2=0x99AABBCCDDEEFF80; pack a0, a1, a2 produces a0=0xDDEEFF8055667788, 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.