GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc

Fix VAX build after CTZ/CLZ changes

Restores VAX architecture builds by adjusting CTZ/CLZ definitions.

Recent changes to Count Trailing Zeros (CTZ) and Count Leading Zeros (CLZ) instructions caused build failures on the VAX architecture. This commit applies a fix similar to one made for the pru-elf target, ensuring VAX builds can proceed by correctly defining CTZ_DEFINED_AT_ZERO using GET_MODE_UNIT_BITSIZE. VAX builds have been verified.

In Details

The CTZ_DEFINED_AT_ZERO macro in config/vax/vax.h was affected by recent changes to CTZ/CLZ intrinsics. This commit adjusts the macro definition to use GET_MODE_UNIT_BITSIZE, resolving a build issue for the VAX port.

For Context
CTZ
Count Trailing Zeros. An instruction that counts the number of zero bits from the least significant bit up to the first set bit.
CLZ
Count Leading Zeros. An instruction that counts the number of zero bits from the most significant bit down to the first set bit.
VAX
A discontinued family of minicomputers designed by Digital Equipment Corporation (DEC).
GET_MODE_UNIT_BITSIZE
A GCC macro that returns the number of bits in a machine mode, considering the underlying data type's size.
Filed Under: vaxbuild fix