[4/4] sparc: Use default memset for rtld objects

Message ID 1507211472-1194-4-git-send-email-adhemerval.zanella@linaro.org
State New
Headers show
Series
  • [1/4] sparc: Implement memcpy/mempcpy ifunc selection in C
Related show

Commit Message

Adhemerval Zanella Oct. 5, 2017, 1:51 p.m.
Both SPARC support multiarch platforms (sparcv9 and sparc64) have the
a default assembly implemented memset.  Since it should not be any
restriction about it them on the loader object and assuming they are
faster than generic ones this patch uses them for rtld objects.

Also, there is no indication neither on original patch [1] or in commit
message why the generic one where used instead of the sparc optimized
ones.

Checked on sparc64-linux-gnu and sparcv9-linux-gnu.

	* sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.S: New file.
	* sysdeps/sparc/sparc64/multiarch/rtld-memset.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.c: Remove
	file.
	* sysdeps/sparc/sparc32/sparcv9/rtld-memset.c: Likewise.
	* sysdeps/sparc/sparc64/multiarch/rtld-memset.c: Likewise.
	* sysdeps/sparc/sparc64/rtld-memset.c: Likewise.
---
 ChangeLog                                             | 8 ++++++++
 sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.S | 1 +
 sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.c | 1 -
 sysdeps/sparc/sparc32/sparcv9/rtld-memset.c           | 1 -
 sysdeps/sparc/sparc64/multiarch/rtld-memset.S         | 1 +
 sysdeps/sparc/sparc64/multiarch/rtld-memset.c         | 1 -
 sysdeps/sparc/sparc64/rtld-memset.c                   | 1 -
 7 files changed, 10 insertions(+), 4 deletions(-)
 create mode 100644 sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.S
 delete mode 100644 sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.c
 delete mode 100644 sysdeps/sparc/sparc32/sparcv9/rtld-memset.c
 create mode 100644 sysdeps/sparc/sparc64/multiarch/rtld-memset.S
 delete mode 100644 sysdeps/sparc/sparc64/multiarch/rtld-memset.c
 delete mode 100644 sysdeps/sparc/sparc64/rtld-memset.c

-- 
2.7.4

Comments

David Miller Oct. 5, 2017, 4:50 p.m. | #1
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>

Date: Thu,  5 Oct 2017 10:51:12 -0300

> Both SPARC support multiarch platforms (sparcv9 and sparc64) have the

> a default assembly implemented memset.  Since it should not be any

> restriction about it them on the loader object and assuming they are

> faster than generic ones this patch uses them for rtld objects.

> 

> Also, there is no indication neither on original patch [1] or in commit

> message why the generic one where used instead of the sparc optimized

> ones.


Same exact feedback as patch #3.

The ultra1 variant uses very cpu specific characteristics and is a poor
choice as a default.

The C variant, baring a newly written assembler default, is the best
choice by far.

Patch

diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.S b/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.S
new file mode 100644
index 0000000..6e02eeb
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.S
@@ -0,0 +1 @@ 
+#include <sysdeps/sparc/sparc32/sparcv9/memset.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.c b/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.c
deleted file mode 100644
index f24ae88..0000000
--- a/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.c
+++ /dev/null
@@ -1 +0,0 @@ 
-#include <sparc64/multiarch/rtld-memset.c>
diff --git a/sysdeps/sparc/sparc32/sparcv9/rtld-memset.c b/sysdeps/sparc/sparc32/sparcv9/rtld-memset.c
deleted file mode 100644
index 49b29f5..0000000
--- a/sysdeps/sparc/sparc32/sparcv9/rtld-memset.c
+++ /dev/null
@@ -1 +0,0 @@ 
-#include <sparc64/rtld-memset.c>
diff --git a/sysdeps/sparc/sparc64/multiarch/rtld-memset.S b/sysdeps/sparc/sparc64/multiarch/rtld-memset.S
new file mode 100644
index 0000000..e9f078e
--- /dev/null
+++ b/sysdeps/sparc/sparc64/multiarch/rtld-memset.S
@@ -0,0 +1 @@ 
+#include <sysdeps/sparc/sparc64/memset.S>
diff --git a/sysdeps/sparc/sparc64/multiarch/rtld-memset.c b/sysdeps/sparc/sparc64/multiarch/rtld-memset.c
deleted file mode 100644
index c01eb0b..0000000
--- a/sysdeps/sparc/sparc64/multiarch/rtld-memset.c
+++ /dev/null
@@ -1 +0,0 @@ 
-#include "../rtld-memset.c"
diff --git a/sysdeps/sparc/sparc64/rtld-memset.c b/sysdeps/sparc/sparc64/rtld-memset.c
deleted file mode 100644
index 55f3835..0000000
--- a/sysdeps/sparc/sparc64/rtld-memset.c
+++ /dev/null
@@ -1 +0,0 @@ 
-#include <string/memset.c>