summaryrefslogtreecommitdiff
path: root/test/xi2/protocol-xiquerydevice.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2011-04-27 18:45:30 -0400
committerMatt Turner <mattst88@gmail.com>2011-08-03 23:38:03 -0400
commitb5db8e73ba366befdfa7ceaafa5a3587fff588fb (patch)
tree3cf9cd12fd43fab399cb0322a2689d5ec47c1b50 /test/xi2/protocol-xiquerydevice.c
parent08dfff92e8d0c2b1726634392c147f6634d1706d (diff)
make byte swapping macros less opaque to the optimizer
Text size reduction of ~33k (1.8%): text data bss dec hex filename 1879739 72212 55328 2007279 1ea0ef hw/xfree86/Xorg.before 1845291 72212 55328 1972831 1e1a5f hw/xfree86/Xorg On x86[-64], the number of bswap instructions goes up from 5 to 1006. By defining lswapl as gcc's builtin bswap32, the number of bswap instructions used goes up to 1025, but the text and binary sizes stay the same. This tells me that either gcc is - dumb, and unable to optimize away __builtin_bswap32 when it should - smart, and able to optimize away the open-coded bswap Either way, it doesn't matter much. Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'test/xi2/protocol-xiquerydevice.c')
0 files changed, 0 insertions, 0 deletions