diff options
author | Erik Schnetter <schnetter@gmail.com> | 2013-03-21 23:25:54 -0400 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2013-03-21 23:25:54 -0400 |
commit | 78928593104a538e006775c76e2eea510a81d416 (patch) | |
tree | 454eca6ed9840015ec2e00ae7dbfa61a7769aaec /pocl | |
parent | b4db872fadd12543d7410cd940d91272804f1dcd (diff) | |
download | vecmathlib-78928593104a538e006775c76e2eea510a81d416.zip vecmathlib-78928593104a538e006775c76e2eea510a81d416.tar.gz |
Handle x=0 in ilogb(x) for pocl
Diffstat (limited to 'pocl')
-rwxr-xr-x | pocl/generate-files.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pocl/generate-files.py b/pocl/generate-files.py index 69f5abd..613de5c 100755 --- a/pocl/generate-files.py +++ b/pocl/generate-files.py @@ -88,7 +88,7 @@ directfuncs = [ ("fmin" , [VF, SF ], VF, "fmin(x0,(vector_t)x1)"), ("fract" , [VF, PVF ], VF, "*x1=floor(x0), fmin(x0-floor(x0), sizeof(scalar_t)==sizeof(float) ? (scalar_t)0x1.fffffep-1f : (scalar_t)0x1.fffffffffffffp-1)"), ("frexp" , [VF, PVK ], VF, "*x1=ilogb(x0), ldexp(x0,-ilogb(x0))"), - ("ilogb" , [VF ], VK, "convert_kvector_t(({ __attribute__((__overloadable__)) jvector_t ilogb_(vector_t); ilogb_(x0); }))"), + ("ilogb" , [VF ], VK, "convert_kvector_t(({ __attribute__((__overloadable__)) jvector_t ilogb_(vector_t); jvector_t jmin=sizeof(jvector_t)==sizeof(int)?INT_MIN:LONG_MIN; jvector_t r=ilogb_(x0); select(r, (jvector_t)FP_ILOGB0, r==jmin); }))"), ("ldexp" , [VF, VK ], VF, "({ __attribute__((__overloadable__)) vector_t ldexp_(vector_t,jvector_t); ldexp_(x0,convert_ivector_t(x1)); })"), ("ldexp" , [VF, SK ], VF, "({ __attribute__((__overloadable__)) vector_t ldexp_(vector_t,kscalar_t); ldexp_(x0,(kscalar_t)x1); })"), ("logb" , [VF ], VF, "convert_vector_t(ilogb(x0))"), |