Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 710640 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-7 / +8 lines)
Line  Link Here
0
--
0
++ b/backend/src/libocl/tmpl/ocl_integer.tmpl.cl
1
-- a/backend/src/libocl/tmpl/ocl_integer.tmpl.cl
Lines 216-228 OVERLOADABLE ulong mad_sat(ulong a, ulong b, ulong c) { Link Here
216
  return __gen_ocl_mad_sat(a, b, c);
216
  return __gen_ocl_mad_sat(a, b, c);
217
}
217
}
218
OVERLOADABLE uchar __rotate_left(uchar x, uchar y) { return (x << y) | (x >> (8 - y)); }
218
// the 'volatile' is to make the LLVM optimizer leave these alone, as it would convert them to intrinsics (fshl/fshr) that we don't implement
219
OVERLOADABLE uchar __rotate_left(uchar x, uchar y) { volatile uchar z; z = (x << y); return z | (x >> (8 - y)); }
219
OVERLOADABLE char __rotate_left(char x, char y) { return __rotate_left((uchar)x, (uchar)y); }
220
OVERLOADABLE char __rotate_left(char x, char y) { return __rotate_left((uchar)x, (uchar)y); }
220
OVERLOADABLE ushort __rotate_left(ushort x, ushort y) { return (x << y) | (x >> (16 - y)); }
221
OVERLOADABLE ushort __rotate_left(ushort x, ushort y) { volatile ushort z; z = (x << y); return z | (x >> (16 - y)); }
221
OVERLOADABLE short __rotate_left(short x, short y) { return __rotate_left((ushort)x, (ushort)y); }
222
OVERLOADABLE short __rotate_left(short x, short y) { return __rotate_left((ushort)x, (ushort)y); }
222
OVERLOADABLE uint __rotate_left(uint x, uint y) { return (x << y) | (x >> (32 - y)); }
223
OVERLOADABLE uint __rotate_left(uint x, uint y) { volatile uint z; z = (x << y); return z | (x >> (32 - y)); }
223
OVERLOADABLE int __rotate_left(int x, int y) { return __rotate_left((uint)x, (uint)y); }
224
OVERLOADABLE int __rotate_left(int x, int y) { return __rotate_left((uint)x, (uint)y); }
224
OVERLOADABLE ulong __rotate_left(ulong x, ulong y) { return (x << y) | (x >> (64 - y)); }
225
OVERLOADABLE ulong __rotate_left(ulong x, ulong y) { volatile ulong z; z = (x << y); return z | (x >> (64 - y)); }
225
OVERLOADABLE long __rotate_left(long x, long y) { return __rotate_left((ulong)x, (ulong)y); }
226
OVERLOADABLE long __rotate_left(long x, long y) { return __rotate_left((ulong)x, (ulong)y); }
226
#define DEF(type, m) OVERLOADABLE type rotate(type x, type y) { return __rotate_left(x, (type)(y & m)); }
227
#define DEF(type, m) OVERLOADABLE type rotate(type x, type y) { return __rotate_left(x, (type)(y & m)); }
227
DEF(char, 7)
228
DEF(char, 7)
228
-- a/backend/src/backend/gen_register.hpp
229
++ b/backend/src/backend/gen_register.hpp
Lines 225-230 namespace gbe Link Here
225
                       uint32_t width,
225
                       uint32_t width,
226
                       uint32_t hstride)
226
                       uint32_t hstride)
227
    {
227
    {
228
      this->value.reg = 0;//avoid subgroup crash
228
      this->type = type;
229
      this->type = type;
229
      this->file = file;
230
      this->file = file;
230
      this->nr = nr;
231
      this->nr = nr;

Return to bug 710640