Next: , Previous: , Up: Target Builtins   [Contents][Index]


6.60.21 picoChip Built-in Functions

GCC provides an interface to selected machine instructions from the picoChip instruction set.

int __builtin_sbc (int value)

Sign bit count. Return the number of consecutive bits in value that have the same value as the sign bit. The result is the number of leading sign bits minus one, giving the number of redundant sign bits in value.

int __builtin_byteswap (int value)

Byte swap. Return the result of swapping the upper and lower bytes of value.

int __builtin_brev (int value)

Bit reversal. Return the result of reversing the bits in value. Bit 15 is swapped with bit 0, bit 14 is swapped with bit 1, and so on.

int __builtin_adds (int x, int y)

Saturating addition. Return the result of adding x and y, storing the value 32767 if the result overflows.

int __builtin_subs (int x, int y)

Saturating subtraction. Return the result of subtracting y from x, storing the value -32768 if the result overflows.

void __builtin_halt (void)

Halt. The processor stops execution. This built-in is useful for implementing assertions.