[2/7] Don't disable SSE in x86-64 ld.so

Message ID 20150825122223.GA1588@gmail.com
State Superseded
Headers

Commit Message

H.J. Lu Aug. 25, 2015, 12:22 p.m. UTC
  Since ld.so preserves vector registers now, we can use SSE in ld.so.

OK for master?

H.J.
---
	* sysdeps/i386/Makefile [$(subdir) == elf] (CFLAGS-.os): Add
	-mno-sse -mno-mmx for $(all-rtld-routines).
	[$(subdir) == elf] (tests-special): Add
	$(objpfx)tst-ld-sse-use.out.
	[$(subdir) == elf] ($(objpfx)tst-ld-sse-use.out): New rule.
	* sysdeps/x86/Makefile [$(subdir) == elf] (CFLAGS-.os): Removed.
	[$(subdir) == elf] (tests-special): Likewise.
	[$(subdir) == elf] ($(objpfx)tst-ld-sse-use.out): Likewise.
	* sysdeps/x86_64/Makefile [$(subdir) == elf] (CFLAGS-.os): Add
	-mno-mmx for $(all-rtld-routines).
---
 sysdeps/i386/Makefile   | 11 +++++++++++
 sysdeps/x86/Makefile    | 11 -----------
 sysdeps/x86_64/Makefile |  3 +++
 3 files changed, 14 insertions(+), 11 deletions(-)
  

Comments

Roland McGrath Aug. 25, 2015, 6:35 p.m. UTC | #1
When you're just moving code from one file to another, make that clear in
the log entry.  The original code needed comments explaining why it's
there.  So add some now.
  

Patch

diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
index 11f425d..2c08907 100644
--- a/sysdeps/i386/Makefile
+++ b/sysdeps/i386/Makefile
@@ -79,3 +79,14 @@  endif
 ifeq ($(subdir),csu)
 gen-as-const-headers += tlsdesc.sym
 endif
+
+ifeq ($(subdir),elf)
+CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
+		   -mno-sse -mno-mmx)
+
+tests-special += $(objpfx)tst-ld-sse-use.out
+$(objpfx)tst-ld-sse-use.out: ../sysdeps/x86/tst-ld-sse-use.sh $(objpfx)ld.so
+	@echo "Checking ld.so for SSE register use.  This will take a few seconds..."
+	$(BASH) $< $(objpfx) '$(NM)' '$(OBJDUMP)' '$(READELF)' > $@; \
+	$(evaluate-test)
+endif
diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile
index c262fdf..0de4f42 100644
--- a/sysdeps/x86/Makefile
+++ b/sysdeps/x86/Makefile
@@ -1,14 +1,3 @@ 
-ifeq ($(subdir),elf)
-CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
-		   -mno-sse -mno-mmx)
-
-tests-special += $(objpfx)tst-ld-sse-use.out
-$(objpfx)tst-ld-sse-use.out: ../sysdeps/x86/tst-ld-sse-use.sh $(objpfx)ld.so
-	@echo "Checking ld.so for SSE register use.  This will take a few seconds..."
-	$(BASH) $< $(objpfx) '$(NM)' '$(OBJDUMP)' '$(READELF)' > $@; \
-	$(evaluate-test)
-endif
-
 ifeq ($(subdir),csu)
 gen-as-const-headers += cpu-features-offsets.sym rtld-global-offsets.sym
 endif
diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile
index f6ef064..e155691 100644
--- a/sysdeps/x86_64/Makefile
+++ b/sysdeps/x86_64/Makefile
@@ -19,6 +19,9 @@  gen-as-const-headers += locale-defines.sym
 endif
 
 ifeq ($(subdir),elf)
+CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
+		   -mno-mmx)
+
 sysdep-dl-routines += tlsdesc dl-tlsdesc
 
 tests += ifuncmain8