summaryrefslogtreecommitdiff
path: root/glx
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2017-03-27 14:59:06 -0700
committerEric Anholt <eric@anholt.net>2017-04-25 15:01:23 -0700
commit563b6ee873b898c0f3e3671cf6adaf91def5d92a (patch)
tree1a073c44df804d33b99595999006a71546597eec /glx
parent5ef4e785131bb30e774a8175099c0432537533fa (diff)
Rewrite the byte swapping macros.
The clever pointer tricks were actually not working, and we were doing the byte-by-byte moves in general. By just doing the memcpy and obvious byte swap code, we end up generating actual byte swap instructions, thanks to optimizing compilers. text data bss dec hex filename before: 2240807 51552 132016 2424375 24fe37 hw/xfree86/Xorg after: 2215167 51552 132016 2398735 249a0f hw/xfree86/Xorg Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'glx')
-rw-r--r--glx/glxbyteorder.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/glx/glxbyteorder.h b/glx/glxbyteorder.h
index 5e94e8626..8f0cd8a4b 100644
--- a/glx/glxbyteorder.h
+++ b/glx/glxbyteorder.h
@@ -37,25 +37,4 @@
#include "misc.h"
-static inline uint16_t
-bswap_16(uint16_t val)
-{
- swap_uint16(&val);
- return val;
-}
-
-static inline uint32_t
-bswap_32(uint32_t val)
-{
- swap_uint32(&val);
- return val;
-}
-
-static inline uint64_t
-bswap_64(uint64_t val)
-{
- swap_uint64(&val);
- return val;
-}
-
#endif /* !defined(__GLXBYTEORDER_H__) */