binutils Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
s390

s390: cksm instruction requires register pair for operand R2

Ensures the CKSM instruction on s390 uses a register pair for its R2 operand, as required by the architecture.

The s390 CKSK instruction requires its R2 operand to designate an even-odd pair of general registers. This commit enforces this requirement by updating the instruction format and adding tests to ensure correct operand usage. This prevents specification exceptions that could arise from using non-even registers.

In Details

The s390 CKSK instruction, which computes a checksum, uses a register pair for its second operand (R2). This pair must be an even-numbered register (e.g., R0/R1, R2/R3) for correct operation. This change modifies opcodes/s390-opc.c to use the RRE_RRE format and updates gas/testsuite/gas/s390/esa-g5.* to include tests verifying this register pair constraint.

For Context
CKSM
A s390 architecture instruction that calculates a checksum over a specified memory region.
s390
A family of mainframe computer architectures developed by IBM. Binutils includes support for assembling and disassembling code for s390 processors.
Register Pair
On s390, certain instructions require two adjacent general-purpose registers to function as a single 64-bit address or data unit. The even-numbered register in the pair typically holds the most significant part, and the odd-numbered register holds the least significant part.
Specification Exception
An interrupt or trap generated by the hardware when an instruction is executed with operands or conditions that violate the architecture's rules, preventing correct operation.
Filed Under: s390assemblerinstruction format