[PATCH] test/input: Replace negative architecture test by test for 64-bit
Mark Kettenis
mark.kettenis at xs4all.nl
Tue Feb 12 06:13:10 PST 2013
> Sender: geert.uytterhoeven at gmail.com
> Date: Tue, 12 Feb 2013 14:03:50 +0100
>
> On Tue, Feb 12, 2013 at 1:40 PM, Mark Kettenis <mark.kettenis at xs4all.nl> wrote:
> >> From: Geert Uytterhoeven <geert at linux-m68k.org>
> >> Date: Tue, 12 Feb 2013 11:17:22 +0100
> >>
> >> The test for double-aligned members in dix_valuator_alloc() currently
> >> depends on "if !defined(__i386__) && !defined(__sh__)". This covers
> >> m68k, where it fails.
> >>
> >> According to the comment, the test should be limited to 64-bit
> >> platforms only. Hence check if sizeof(long) == 8 instead.
> >
> > Unfortunately the comment isn't accurate. There are quite a few
> > 32-bit architectures that demand 64-bit alignment of doubles. At
> > least arm, hppa, powerpc and sparc fall into that category. Those
> > that only required 32-bit alignment seemed to be a minority. Even if
> > you include m68k in that category, that's still the case.
>
> Sure there are others.
>
> But what is this test really trying to achieve?
An independent test of the somewhat twisted logic in the valuator
implementation that tries to implement a variable-sized data structure
where the variable-sized bit is properly aligned to be accessed as a
double.
More information about the xorg-devel
mailing list