x86: Don't include <init-arch.h> in assembly codes

Message ID 20180801152033.17968-1-hjl.tools@gmail.com
State New
Headers show
Series
  • x86: Don't include <init-arch.h> in assembly codes
Related show

Commit Message

H.J. Lu Aug. 1, 2018, 3:20 p.m.
There is no need to include <init-arch.h> in assembly codes since all
x86 IFUNC selector functions are written in C.  Tested on i686 and
x86-64.  There is no code change in libc.so, ld.so and libmvec.so.
---
 sysdeps/i386/i686/multiarch/bzero-ia32.S               | 1 -
 sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S   | 1 -
 sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S | 1 -
 sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S  | 1 -
 4 files changed, 4 deletions(-)

-- 
2.17.1

Comments

Florian Weimer Aug. 3, 2018, 12:45 p.m. | #1
On 08/01/2018 05:20 PM, H.J. Lu wrote:
> There is no need to include <init-arch.h> in assembly codes since all

> x86 IFUNC selector functions are written in C.  Tested on i686 and

> x86-64.  There is no code change in libc.so, ld.so and libmvec.so.

> ---

>   sysdeps/i386/i686/multiarch/bzero-ia32.S               | 1 -

>   sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S   | 1 -

>   sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S | 1 -

>   sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S  | 1 -

>   4 files changed, 4 deletions(-)


Needs a ChangeLog entry.  Actual change looks okay.

Thanks,
Florian
H.J. Lu Aug. 3, 2018, 1:38 p.m. | #2
On Fri, Aug 3, 2018 at 5:45 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 08/01/2018 05:20 PM, H.J. Lu wrote:

>>

>> There is no need to include <init-arch.h> in assembly codes since all

>> x86 IFUNC selector functions are written in C.  Tested on i686 and

>> x86-64.  There is no code change in libc.so, ld.so and libmvec.so.

>> ---

>>   sysdeps/i386/i686/multiarch/bzero-ia32.S               | 1 -

>>   sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S   | 1 -

>>   sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S | 1 -

>>   sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S  | 1 -

>>   4 files changed, 4 deletions(-)

>

>

> Needs a ChangeLog entry.  Actual change looks okay.

>


Here is the updated patch I am checking in with ChangeLog entry.

Thanks.

-- 
H.J.
From 849f4349150633c82ad82e52f699eeda537c3e35 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Thu, 26 Jul 2018 08:37:31 -0700
Subject: [PATCH] x86: Don't include <init-arch.h> in assembly codes

There is no need to include <init-arch.h> in assembly codes since all
x86 IFUNC selector functions are written in C.  Tested on i686 and
x86-64.  There is no code change in libc.so, ld.so and libmvec.so.

	* sysdeps/i386/i686/multiarch/bzero-ia32.S: Don't include
	<init-arch.h>.
	* sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S: Likewise.
	* sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S: Likewise.
	* sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S: Likewise.
---
 sysdeps/i386/i686/multiarch/bzero-ia32.S               | 1 -
 sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S   | 1 -
 sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S | 1 -
 sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S  | 1 -
 4 files changed, 4 deletions(-)

diff --git a/sysdeps/i386/i686/multiarch/bzero-ia32.S b/sysdeps/i386/i686/multiarch/bzero-ia32.S
index 68ff9e1e90..94d13e88f7 100644
--- a/sysdeps/i386/i686/multiarch/bzero-ia32.S
+++ b/sysdeps/i386/i686/multiarch/bzero-ia32.S
@@ -17,7 +17,6 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
-#include <init-arch.h>
 
 #if IS_IN (libc)
 # define __bzero __bzero_ia32
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S b/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S
index b64c3390d6..87536a06a3 100644
--- a/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S
+++ b/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S
@@ -17,7 +17,6 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
-#include <init-arch.h>
 
 #define _ZGVeN8v_sin _ZGVeN8v_sin_avx2_wrapper
 #include "../svml_d_sin8_core.S"
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S b/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S
index e0b7fd787f..16713ba714 100644
--- a/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S
+++ b/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S
@@ -17,7 +17,6 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
-#include <init-arch.h>
 
 #define _ZGVeN16v_expf _ZGVeN16v_expf_avx2_wrapper
 #include "../svml_s_expf16_core.S"
diff --git a/sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S b/sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S
index be6671759b..56b81f5cc5 100644
--- a/sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S
+++ b/sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S
@@ -19,7 +19,6 @@
 
 #include <sysdep.h>
 #include <shlib-compat.h>
-#include <init-arch.h>
 
 #if IS_IN (libc)
 # define MEMSET_SYMBOL(p,s)	p##_sse2_##s

Patch

diff --git a/sysdeps/i386/i686/multiarch/bzero-ia32.S b/sysdeps/i386/i686/multiarch/bzero-ia32.S
index 68ff9e1e90..94d13e88f7 100644
--- a/sysdeps/i386/i686/multiarch/bzero-ia32.S
+++ b/sysdeps/i386/i686/multiarch/bzero-ia32.S
@@ -17,7 +17,6 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
-#include <init-arch.h>
 
 #if IS_IN (libc)
 # define __bzero __bzero_ia32
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S b/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S
index b64c3390d6..87536a06a3 100644
--- a/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S
+++ b/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S
@@ -17,7 +17,6 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
-#include <init-arch.h>
 
 #define _ZGVeN8v_sin _ZGVeN8v_sin_avx2_wrapper
 #include "../svml_d_sin8_core.S"
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S b/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S
index e0b7fd787f..16713ba714 100644
--- a/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S
+++ b/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S
@@ -17,7 +17,6 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
-#include <init-arch.h>
 
 #define _ZGVeN16v_expf _ZGVeN16v_expf_avx2_wrapper
 #include "../svml_s_expf16_core.S"
diff --git a/sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S b/sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S
index be6671759b..56b81f5cc5 100644
--- a/sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S
+++ b/sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S
@@ -19,7 +19,6 @@ 
 
 #include <sysdep.h>
 #include <shlib-compat.h>
-#include <init-arch.h>
 
 #if IS_IN (libc)
 # define MEMSET_SYMBOL(p,s)	p##_sse2_##s