diff options
Diffstat (limited to 'test/regression/builtins-arm.c')
-rw-r--r-- | test/regression/builtins-arm.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/regression/builtins-arm.c b/test/regression/builtins-arm.c new file mode 100644 index 00000000..41ea88b5 --- /dev/null +++ b/test/regression/builtins-arm.c @@ -0,0 +1,23 @@ +/* Fun with builtins */ + +#include <stdio.h> + +int main(int argc, char ** argv) +{ + unsigned int x = 0x12345678; + unsigned int y = 0xDEADBEEF; + double a = 3.14159; + unsigned short s = 0x1234; + + printf("bswap(%x) = %x\n", x, __builtin_bswap(x)); + printf("bswap16(%x) = %x\n", s, __builtin_bswap16(s)); + printf("cntlz(%x) = %d\n", x, __builtin_cntlz(x)); + printf("fsqrt(%f) = %f\n", a, __builtin_fsqrt(a)); + + return 0; +} + + + + + |