[Libclc-dev] [bug-fix] add_sat cannot handle type larger than i8 correctly.
peter at pcc.me.uk
Sun Aug 5 15:51:38 PDT 2012
On Sat, Jun 02, 2012 at 03:08:48PM +0800, Lei Mou wrote:
> Patch for sub_sat.
Thanks, applied in r161312.
> PS: I noticed that in the generated Makefile, file
> generic/lib/integer/add_sat.ll was not compiled (ptx/lib/integer/add_sat.ll
> was linked into builtin.bc). I'm not quite sure whether the file has some
> special purpose, or there is a bug in the build system. So I also added
> file sub_sat.ll in the same folder.
lib/integer/add_sat.ll is a hack to allow OpenCL C code to call
functions which use the default calling convention (the PTX backend
required every function to have either ptx_kernel or ptx_device
calling convention; I'm not sure about NVPTX but if it supports the
default then we should get rid of this hack). The generic version of
this file is currently unused because we do not support any target
other than NVPTX, but this may change in the future.
More information about the Libclc-dev