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

s390: Enforce register constraints for km/kmc instructions

Assembler now enforces register constraints for s390 km and kmc instructions.

This commit updates the s390 assembler to enforce architectural constraints on the register operands for the km and kmc instructions. It ensures that R1 designates an even-numbered register (not 0) and R2 designates an even-odd pair of general registers (also not 0), preventing specification exceptions.

In Details

This patch modifies the s390 assembler to enforce the architectural requirements for the km and kmc instructions. Specifically, it ensures that R1 is an even register (excluding 0) and R2 is an even-odd register pair (also excluding 0), aligning with the z/Architecture Principles of Operation and preventing specification exceptions.

For Context
s390
A family of mainframe computer architectures developed by IBM.
assembler
A program that translates assembly language into machine code.
register pair
On some architectures, certain instructions require two adjacent registers to function as a single, wider operand. For example, an even-numbered register and the immediately following odd-numbered register can form a pair.
specification exception
An error condition detected by the hardware when an instruction is executed with operands or conditions that violate the architecture's rules.
km
A s390 machine instruction.
kmc
A s390 machine instruction.
Filed Under: s390assemblerarchitecture