Next: Byte-Swapping Builtins, Previous: Floating-Point Format Builtins, Up: Numeric Builtins [Contents][Index]
Returns one plus the index of the least significant 1-bit of x, or if x is zero, returns zero.
Returns the number of leading 0-bits in x, starting at the most significant bit position. If x is 0, the result is undefined.
Returns the number of trailing 0-bits in x, starting at the least significant bit position. If x is 0, the result is undefined.
Returns the number of leading redundant sign bits in x, i.e. the number of bits following the most significant bit that are identical to it. There are no special cases for 0 or other values.
Returns the parity of x, i.e. the number of 1-bits in x modulo 2.
Similar to __builtin_ffs, except the argument type is long.
Similar to __builtin_clz, except the argument type is unsigned long.
Similar to __builtin_ctz, except the argument type is unsigned long.
Similar to __builtin_clrsb, except the argument type is long.
Similar to __builtin_popcount, except the argument type is unsigned long.
Similar to __builtin_parity, except the argument type is unsigned long.
Similar to __builtin_ffs, except the argument type is long long.
Similar to __builtin_clz, except the argument type is unsigned long long.
Similar to __builtin_ctz, except the argument type is unsigned long long.
Similar to __builtin_clrsb, except the argument type is long long.
Similar to __builtin_popcount, except the argument type is unsigned long long.
Similar to __builtin_parity, except the argument type is unsigned long long.
Similar to __builtin_ffs, except the argument is type-generic signed integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument.
Similar to __builtin_clz, except the argument is type-generic unsigned integer (standard, extended or bit-precise) and there is optional second argument with int type. No integral argument promotions are performed on the first argument. If two arguments are specified, and first argument is 0, the result is the second argument. If only one argument is specified and it is 0, the result is undefined.
Similar to __builtin_ctz, except the argument is type-generic unsigned integer (standard, extended or bit-precise) and there is optional second argument with int type. No integral argument promotions are performed on the first argument. If two arguments are specified, and first argument is 0, the result is the second argument. If only one argument is specified and it is 0, the result is undefined.
Similar to __builtin_clrsb, except the argument is type-generic signed integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument.
Similar to __builtin_popcount, except the argument is type-generic unsigned integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument.
Similar to __builtin_parity, except the argument is type-generic unsigned integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument.
The __builtin_stdc_bit_ceil function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument. It is equivalent to arg <= 1 ? (type) 1 : (type) 2 << (prec - 1 - __builtin_clzg ((type) (arg - 1))) where prec is bit width of type, except that side-effects in arg are evaluated just once.
The __builtin_stdc_bit_floor function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument. It is equivalent to arg == 0 ? (type) 0 : (type) 1 << (prec - 1 - __builtin_clzg (arg)) where prec is bit width of type, except that side-effects in arg are evaluated just once.
The __builtin_stdc_bit_width function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument. It is equivalent to (unsigned int) (prec - __builtin_clzg (arg, prec)) where prec is bit width of type.
The __builtin_stdc_count_ones function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument. It is equivalent to (unsigned int) __builtin_popcountg (arg)
The __builtin_stdc_count_zeros function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument. It is equivalent to (unsigned int) __builtin_popcountg ((type) ~arg)
The __builtin_stdc_first_leading_one function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument. It is equivalent to __builtin_clzg (arg, -1) + 1U
The __builtin_stdc_first_leading_zero function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument. It is equivalent to __builtin_clzg ((type) ~arg, -1) + 1U
The __builtin_stdc_first_trailing_one function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument. It is equivalent to __builtin_ctzg (arg, -1) + 1U
The __builtin_stdc_first_trailing_zero function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument. It is equivalent to __builtin_ctzg ((type) ~arg, -1) + 1U
The __builtin_stdc_has_single_bit function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument. It is equivalent to (_Bool) (__builtin_popcountg (arg) == 1)
The __builtin_stdc_leading_ones function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument. It is equivalent to (unsigned int) __builtin_clzg ((type) ~arg, prec)
The __builtin_stdc_leading_zeros function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument. It is equivalent to (unsigned int) __builtin_clzg (arg, prec)
The __builtin_stdc_trailing_ones function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument. It is equivalent to (unsigned int) __builtin_ctzg ((type) ~arg, prec)
The __builtin_stdc_trailing_zeros function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are performed on the argument. It is equivalent to (unsigned int) __builtin_ctzg (arg, prec)
The __builtin_stdc_rotate_left function is available only in C. It is type-generic, the first argument can be any unsigned integer (standard, extended or bit-precise) and second argument any signed or unsigned integer or char. No integral argument promotions are performed on the arguments. It is equivalent to (type1) ((arg1 << (arg2 % prec)) | (arg1 >> ((-(unsigned type2) arg2) % prec))) where prec is bit width of type1, except that side-effects in arg1 and arg2 are evaluated just once. The behavior is undefined if arg2 is negative.
The __builtin_stdc_rotate_right function is available only in C. It is type-generic, the first argument can be any unsigned integer (standard, extended or bit-precise) and second argument any signed or unsigned integer or char. No integral argument promotions are performed on the arguments. It is equivalent to (type1) ((arg1 >> (arg2 % prec)) | (arg1 << ((-(unsigned type2) arg2) % prec))) where prec is bit width of type1, except that side-effects in arg1 and arg2 are evaluated just once. The behavior is undefined if arg2 is negative.
Next: Byte-Swapping Builtins, Previous: Floating-Point Format Builtins, Up: Numeric Builtins [Contents][Index]