Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/nathanw_sa]: src/sys/arch/m68k/include Optimize bswap16() and bswap32() ...



details:   https://anonhg.NetBSD.org/src/rev/d5f8cb58b065
branches:  nathanw_sa
changeset: 504598:d5f8cb58b065
user:      leo <leo%NetBSD.org@localhost>
date:      Fri Mar 30 20:00:06 2001 +0000

description:
Optimize bswap16() and bswap32() functions to inline assembly.

diffstat:

 sys/arch/m68k/include/bswap.h |  18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diffs (22 lines):

diff -r d3e368910c6b -r d5f8cb58b065 sys/arch/m68k/include/bswap.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/m68k/include/bswap.h     Fri Mar 30 20:00:06 2001 +0000
@@ -0,0 +1,18 @@
+/*      $NetBSD: bswap.h,v 1.3.8.2 2001/03/30 20:00:06 leo Exp $      */
+
+#ifndef _MACHINE_BSWAP_H_
+#define        _MACHINE_BSWAP_H_
+
+#define        __BSWAP_RENAME
+#include <sys/bswap.h>
+
+#ifdef __GNUC__
+
+#include <m68k/byte_swap.h>
+
+#define bswap16(x)     __byte_swap_word(x)
+#define bswap32(x)     __byte_swap_long(x)
+
+#endif /* __GNUC__ */
+
+#endif /* !_MACHINE_BSWAP_H_ */



Home | Main Index | Thread Index | Old Index