[PULL] bswap cleanup and misc patches
Matt Turner
mattst88 at gmail.com
Fri Sep 2 16:05:28 PDT 2011
Hi Keith,
Please pull from my tree. It contains four miscellaneous patches that
were reviewed months ago and clean ups to the bswap macros.
The bswap macro clean ups add size checking, which eliminates the
possibility of mistakes like calling swapl on a short. Because of the
size checking, quite a number of incorrectly sized swaps were found and
corrected.
The clean ups also allow gcc to generate better code, as measured by the
increased number of bswap (5 -> 308) and rol (811 -> 1174) instructions.
I also make use of gcc's __builtin_constant_p to catch cases where the
value swapped isn't known at compile-time but its address is known to be
naturally aligned.
For the bswap series, I was only successful in getting a single
reviewer. Let me reiterate that the first patch is *automated* + removal
of dead variables by grepping the compile log.
Thanks,
Matt
The following changes since commit 0caeef6146bee5fb1827ab25db191685dde9d4b4:
Version bumped to 1.11 (2011-08-26 16:46:13 -0700)
are available in the git repository at:
git://people.freedesktop.org/~mattst88/xserver for-keith
Matt Turner (12):
Use abs() on integers, not fabs()
Remove unnecessary #undefs of [f]abs and old comments
Replace Fabs() macro with fabs() function
Silence printf format warnings in helper_exec.c
Use internal temp variable for swap macros
Use correct swap{l,s} (or none at all for CARD8)
Cast char* buffers to swap functions
Introduce swap_uint{16,32} functions, used in swap{l,s}
Add type checking to swap macros
Make lswap{l,s} inline functions
Use lswap{l,s} in cpswap{l,s}
Use __builtin_constant_p to determine if we can use lswapl
Peter Harris (1):
xkb: add missing swaps for xkbGetDeviceInfoReply
Xext/bigreq.c | 7 +-
Xext/dpms.c | 60 +--
Xext/geext.c | 16 +-
Xext/panoramiX.c | 62 ++--
Xext/panoramiXSwap.c | 26 +-
Xext/saver.c | 68 ++--
Xext/security.c | 37 +-
Xext/shape.c | 110 ++---
Xext/shm.c | 108 +++---
Xext/sync.c | 186 +++-----
Xext/xcmisc.c | 36 +-
Xext/xf86bigfont.c | 62 ++--
Xext/xres.c | 64 +--
Xext/xselinux_ext.c | 64 ++--
Xext/xtest.c | 30 +-
Xext/xvdisp.c | 407 ++++++++----------
Xi/allowev.c | 6 +-
Xi/chgdctl.c | 15 +-
Xi/chgfctl.c | 52 +--
Xi/chgkbd.c | 4 +-
Xi/chgkmap.c | 3 +-
Xi/chgprop.c | 8 +-
Xi/chgptr.c | 4 +-
Xi/closedev.c | 4 +-
Xi/devbell.c | 4 +-
Xi/extinit.c | 238 +++++------
Xi/getbmap.c | 10 +-
Xi/getdctl.c | 33 +-
Xi/getfctl.c | 64 ++--
Xi/getfocus.c | 14 +-
Xi/getkmap.c | 10 +-
Xi/getmmap.c | 10 +-
Xi/getprop.c | 14 +-
Xi/getselev.c | 16 +-
Xi/getvers.c | 16 +-
Xi/grabdev.c | 16 +-
Xi/grabdevb.c | 10 +-
Xi/grabdevk.c | 10 +-
Xi/gtmotion.c | 20 +-
Xi/listdev.c | 28 +-
Xi/opendev.c | 10 +-
Xi/queryst.c | 13 +-
Xi/selectev.c | 8 +-
Xi/sendexev.c | 7 +-
Xi/setbmap.c | 10 +-
Xi/setdval.c | 10 +-
Xi/setfocus.c | 8 +-
Xi/setmmap.c | 10 +-
Xi/setmode.c | 10 +-
Xi/ungrdev.c | 6 +-
Xi/ungrdevb.c | 8 +-
Xi/ungrdevk.c | 8 +-
Xi/xiallowev.c | 8 +-
Xi/xichangecursor.c | 10 +-
Xi/xichangehierarchy.c | 11 +-
Xi/xigetclientpointer.c | 12 +-
Xi/xigrabdev.c | 28 +-
Xi/xipassivegrab.c | 47 +--
Xi/xiproperty.c | 102 ++---
Xi/xiquerydevice.c | 66 ++--
Xi/xiquerypointer.c | 28 +-
Xi/xiqueryversion.c | 17 +-
Xi/xiselectev.c | 30 +-
Xi/xisetclientpointer.c | 8 +-
Xi/xisetdevfocus.c | 23 +-
Xi/xiwarppointer.c | 22 +-
composite/compext.c | 74 ++--
damageext/damageext.c | 44 +-
dbe/dbe.c | 63 ++--
dix/dispatch.c | 2 +-
dix/swaprep.c | 401 +++++++----------
dix/swapreq.c | 728 ++++++++++++++-----------------
glx/glxserver.h | 6 -
hw/dmx/dmx.c | 241 +++++------
hw/dmx/glxProxy/glxserver.h | 6 -
hw/kdrive/ephyr/ephyrdriext.c | 24 +-
hw/kdrive/ephyr/ephyrhostproxy.c | 2 +-
hw/vfb/InitOutput.c | 3 +-
hw/xfree86/dixmods/extmod/xf86vmode.c | 444 +++++++++----------
hw/xfree86/dri/xf86dri.c | 24 +-
hw/xfree86/dri2/dri2ext.c | 16 +-
hw/xfree86/int10/helper_exec.c | 32 +-
hw/xfree86/modes/xf86Crtc.c | 4 +-
hw/xquartz/applewm.c | 8 +-
hw/xquartz/pseudoramiX.c | 65 ++--
hw/xquartz/xpr/appledri.c | 8 +-
hw/xwin/winwindowswm.c | 6 +-
include/misc.h | 100 +++--
mi/miarc.c | 2 +-
mi/mifpoly.h | 6 +-
mi/miwideline.c | 2 +-
os/connection.c | 6 +-
os/io.c | 6 +-
randr/rrcrtc.c | 100 ++---
randr/rrdispatch.c | 9 +-
randr/rrmode.c | 7 +-
randr/rroutput.c | 33 +-
randr/rrproperty.c | 48 +--
randr/rrscreen.c | 106 +++---
randr/rrsdispatch.c | 262 +++++------
randr/rrxinerama.c | 88 ++--
record/record.c | 98 ++---
render/render.c | 442 +++++++++----------
test/xi2/protocol-eventconvert.c | 110 ++---
test/xi2/protocol-xigetclientpointer.c | 12 +-
test/xi2/protocol-xigetselectedevents.c | 17 +-
test/xi2/protocol-xipassivegrabdevice.c | 29 +-
test/xi2/protocol-xiquerydevice.c | 49 +--
test/xi2/protocol-xiquerypointer.c | 24 +-
test/xi2/protocol-xiqueryversion.c | 16 +-
test/xi2/protocol-xiselectevents.c | 11 +-
test/xi2/protocol-xisetclientpointer.c | 7 +-
test/xi2/protocol-xiwarppointer.c | 19 +-
xfixes/cursor.c | 122 +++---
xfixes/region.c | 156 +++----
xfixes/saveset.c | 5 +-
xfixes/select.c | 9 +-
xfixes/xfixes.c | 16 +-
xkb/ddxList.c | 5 +-
xkb/xkb.c | 413 ++++++++----------
xkb/xkbEvents.c | 105 ++---
xkb/xkbSwap.c | 338 ++++++---------
122 files changed, 3246 insertions(+), 4205 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110902/610c9dab/attachment.pgp>
More information about the xorg-devel
mailing list