6.59.18. picoChip Built-in Functions

6.59.18 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.

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gcc/picoChip-Built_002din-Functions.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部