Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/matt-nb6-plus]: src/common/lib/libc/arch/arm/gen Use rev/rev16 on armv6 ...
details: https://anonhg.NetBSD.org/src/rev/5e8179d0aa92
branches: matt-nb6-plus
changeset: 774505:5e8179d0aa92
user: matt <matt%NetBSD.org@localhost>
date: Wed Nov 28 01:45:26 2012 +0000
description:
Use rev/rev16 on armv6 and later.
diffstat:
common/lib/libc/arch/arm/gen/byte_swap_2.S | 6 +++++-
common/lib/libc/arch/arm/gen/byte_swap_4.S | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diffs (43 lines):
diff -r ae8b63fb8032 -r 5e8179d0aa92 common/lib/libc/arch/arm/gen/byte_swap_2.S
--- a/common/lib/libc/arch/arm/gen/byte_swap_2.S Tue Nov 27 23:42:34 2012 +0000
+++ b/common/lib/libc/arch/arm/gen/byte_swap_2.S Wed Nov 28 01:45:26 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: byte_swap_2.S,v 1.4 2008/04/28 20:22:52 martin Exp $ */
+/* $NetBSD: byte_swap_2.S,v 1.4.24.1 2012/11/28 01:45:26 matt Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -41,7 +41,11 @@
_ENTRY(_C_LABEL(htons))
#endif
_PROF_PROLOGUE
+#ifdef _ARM_ARCH_6
+ rev16 r0, r0
+#else
and r1, r0, #0xff
mov r0, r0, lsr #8
orr r0, r0, r1, lsl #8
+#endif
RET
diff -r ae8b63fb8032 -r 5e8179d0aa92 common/lib/libc/arch/arm/gen/byte_swap_4.S
--- a/common/lib/libc/arch/arm/gen/byte_swap_4.S Tue Nov 27 23:42:34 2012 +0000
+++ b/common/lib/libc/arch/arm/gen/byte_swap_4.S Wed Nov 28 01:45:26 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: byte_swap_4.S,v 1.4 2008/04/28 20:22:52 martin Exp $ */
+/* $NetBSD: byte_swap_4.S,v 1.4.24.1 2012/11/28 01:45:26 matt Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -41,8 +41,12 @@
_ENTRY(_C_LABEL(htonl))
#endif
_PROF_PROLOGUE
+#ifdef _ARM_ARCH_6
+ rev r0, r0
+#else
eor r1, r0, r0, ror #16
bic r1, r1, #0x00FF0000
mov r0, r0, ror #8
eor r0, r0, r1, lsr #8
+#endif
RET
Home |
Main Index |
Thread Index |
Old Index