Lines Matching refs:shift
103 #define SHR16(a, shift) _SHR16(a, shift, __FILE__, __LINE__)
104 static inline short _SHR16(int a, int shift, char *file, int line)
107 if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))
109 fprintf (stderr, "SHR16: inputs are not short: %d >> %d in %s: line %d\n", a, shift, file, line);
111 res = a>>shift;
117 #define SHL16(a, shift) _SHL16(a, shift, __FILE__, __LINE__)
118 static inline short _SHL16(int a, int shift, char *file, int line)
121 if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))
123 fprintf (stderr, "SHL16: inputs are not short: %d %d in %s: line %d\n", a, shift, file, line);
125 res = a<<shift;
132 static inline int SHR32(long long a, int shift)
135 if (!VERIFY_INT(a) || !VERIFY_SHORT(shift))
137 fprintf (stderr, "SHR32: inputs are not int: %d %d\n", (int)a, shift);
139 res = a>>shift;
147 static inline int SHL32(long long a, int shift)
150 if (!VERIFY_INT(a) || !VERIFY_SHORT(shift))
152 fprintf (stderr, "SHL32: inputs are not int: %d %d\n", (int)a, shift);
154 res = a<<shift;
163 #define PSHR16(a,shift) (SHR16(ADD16((a),((1<<((shift))>>1))),shift))
164 #define PSHR32(a,shift) (SHR32(ADD32((a),((EXTEND32(1)<<((shift))>>1))),shift))
165 #define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift)))
170 //#define SHR(a,shift) ((a) >> (shift))
171 //#define SHL(a,shift) ((a) << (shift))