diff options
author | Aaron Watry <awatry@gmail.com> | 2013-03-23 12:04:06 -0500 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-04-08 07:12:55 -0700 |
commit | e2f2f9498455eb3130b6f4b4732574771553b7e1 (patch) | |
tree | 849ffb13d719112681b3791566c42b10527b7fb6 /generic/include/clc/integer/gentype.inc | |
parent | 2ae3fd1f635b3a23d5bb49ac3551fd0bc848bac0 (diff) |
libclc: implement rotate builtin
This implementation does a lot of bit shifting and masking. Suffice to say,
this is somewhat suboptimal... but it does look to produce correct results
(after the piglit tests were corrected for sign extension issues).
Someone who knows LLVM better than I could re-write this more efficiently.
Diffstat (limited to 'generic/include/clc/integer/gentype.inc')
-rw-r--r-- | generic/include/clc/integer/gentype.inc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/generic/include/clc/integer/gentype.inc b/generic/include/clc/integer/gentype.inc index 0b32efd..005b9af 100644 --- a/generic/include/clc/integer/gentype.inc +++ b/generic/include/clc/integer/gentype.inc @@ -1,3 +1,4 @@ +#define GENSIZE 8 #define GENTYPE char #define UGENTYPE uchar #define SGENTYPE char @@ -94,6 +95,9 @@ #undef UGENTYPE #undef SGENTYPE +#undef GENSIZE +#define GENSIZE 16 + #define GENTYPE short #define UGENTYPE ushort #define SGENTYPE short @@ -190,6 +194,9 @@ #undef UGENTYPE #undef SGENTYPE +#undef GENSIZE +#define GENSIZE 32 + #define GENTYPE int #define UGENTYPE uint #define SGENTYPE int @@ -286,6 +293,9 @@ #undef UGENTYPE #undef SGENTYPE +#undef GENSIZE +#define GENSIZE 64 + #define GENTYPE long #define UGENTYPE ulong #define SGENTYPE long @@ -382,4 +392,5 @@ #undef UGENTYPE #undef SGENTYPE +#undef GENSIZE #undef BODY |