summaryrefslogtreecommitdiff
path: root/sysdeps/alpha
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-10-24 11:35:04 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-10-24 11:40:08 -0300
commitbe930668eccf842d5a1a068a3e01b660d5bcb813 (patch)
tree1a859f3da01f4a0c5393f90d3977862f53de40ea /sysdeps/alpha
parent29ff5b5b7237c8560dafecd27bd809c80ae5338e (diff)
downloadglibc-be930668eccf842d5a1a068a3e01b660d5bcb813.tar.gz
Remove all assembly optimizations for htonl and htons
The builtin bswap is already used if optimziation is enabled for GCC 4.8+, so glibc symbols will be used in a very limited scenarios. Also, gcc generated code is quite similar to all but ia64 and i386 htons. Checked on alpha, i686, and ia64.
Diffstat (limited to 'sysdeps/alpha')
-rw-r--r--sysdeps/alpha/htonl.S43
-rw-r--r--sysdeps/alpha/htons.S39
2 files changed, 0 insertions, 82 deletions
diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S
deleted file mode 100644
index e205295933..0000000000
--- a/sysdeps/alpha/htonl.S
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (C) 1996-2022 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <sysdep.h>
-
-ENTRY(htonl)
-#ifdef PROF
- ldgp gp, 0(pv)
- .set noat
- lda AT, _mcount
- jsr AT, (AT), _mcount
- .set at
- .prologue 1
-#else
- .prologue 0
-#endif
-
- inslh a0, 7, t0 # t0 = 0000000000AABBCC
- inswl a0, 3, t1 # t1 = 000000CCDD000000
- or t1, t0, t1 # t1 = 000000CCDDAABBCC
- srl t1, 16, t2 # t2 = 0000000000CCDDAA
- zapnot t1, 0x0A, t0 # t0 = 00000000DD00BB00
- zapnot t2, 0x05, t3 # t3 = 0000000000CC00AA
- addl t0, t3, v0 # v0 = ssssssssDDCCBBAA
- ret
-
- END(htonl)
-
-weak_alias (htonl, ntohl)
diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S
deleted file mode 100644
index e44824ef9c..0000000000
--- a/sysdeps/alpha/htons.S
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 1996-2022 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <sysdep.h>
-
-ENTRY(htons)
-#ifdef PROF
- ldgp gp, 0(pv)
- .set noat
- lda AT, _mcount
- jsr AT, (AT), _mcount
- .set at
- .prologue 1
-#else
- .prologue 0
-#endif
-
- extwh a0, 7, t1 # t1 = bb00
- extbl a0, 1, v0 # v0 = 00aa
- bis v0, t1, v0 # v0 = bbaa
- ret
-
- END(htons)
-
-weak_alias (htons, ntohs)