ntdll: Implement missing 64 bit shifts

Erich Hoover ehoover at mines.edu
Tue Dec 7 20:51:47 CST 2010

On Tue, Dec 7, 2010 at 10:51 AM, Mike Gibson
<mike.gibson at storagecraft.com> wrote:
> ...
> The vast majority of platforms seem to do arithmetic right shift.  It would be better to have a #define that indicates what the right shifting behavior is.  Only on those platforms where right shift isn't arithmetic would the slower code be used.
> AFAIK, this sort of thing is determined in the configure step.  I can write a test for it, but I have a suspicion someone may have already done this.  Anyone know?  If not, I would appreciate some pointers (or links) on how to go about adding such a test.

You should be able to test this behavior with AC_COMPILE_IFELSE:
dnl **** Check for arithmetic right shifting ****
AC_CACHE_CHECK([whether the right shift operator is an arithmetic right shift],
[[#if ((-4 >> 1) != -2)
#error "No simple arithmetic right shift"
#endif]], [[]])],
if test "$wine_cv_arithmetic_right_shift" = "yes"
shift operator is an arithmetic shift])
Throw the above in configure.ac and test with "autoconf && autoheader
&& ./configure".

Erich Hoover
ehoover at mines.edu

More information about the wine-devel mailing list