commit | d5395fbf03dc168d00bc8622e86fefbac9a3da2a | [log] [tgz] |
---|---|---|
author | Peter Collingbourne <peter@pcc.me.uk> | Sun Jan 08 22:09:58 2012 +0000 |
committer | Peter Collingbourne <peter@pcc.me.uk> | Sun Jan 08 22:09:58 2012 +0000 |
tree | 2c24697a31ef5ef5445a8ad143aa34f4ef42db9d | |
parent | 11faafe7dce2bd8befa3e2444c2292edcd9b2d50 [diff] [blame] |
Initial commit. llvm-svn: 147756
diff --git a/libclc/generic/lib/integer/abs.inc b/libclc/generic/lib/integer/abs.inc new file mode 100644 index 0000000..fff6691 --- /dev/null +++ b/libclc/generic/lib/integer/abs.inc
@@ -0,0 +1,3 @@ +_CLC_OVERLOAD _CLC_DEF UGENTYPE abs(GENTYPE x) { + return __builtin_astype((GENTYPE)(x > (GENTYPE)(0) ? x : -x), UGENTYPE); +}