summaryrefslogtreecommitdiff
path: root/sysdeps/i386/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/Makefile')
-rw-r--r--sysdeps/i386/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
index 11f425dc92..168512fc32 100644
--- a/sysdeps/i386/Makefile
+++ b/sysdeps/i386/Makefile
@@ -5,6 +5,10 @@ asm-CPPFLAGS += -DGAS_SYNTAX
# The i386 `long double' is a distinct type we support.
long-double-fcts = yes
+ifeq ($(subdir),string)
+sysdep_routines += cacheinfo
+endif
+
ifeq ($(subdir),gmon)
sysdep_routines += i386-mcount
endif
@@ -79,3 +83,17 @@ endif
ifeq ($(subdir),csu)
gen-as-const-headers += tlsdesc.sym
endif
+
+ifeq ($(subdir),elf)
+# Make sure no code in ld.so uses mm/xmm/ymm/zmm registers on i386 since
+# the first 3 mm/xmm/ymm/zmm registers are used to pass vector parameters
+# which must be preserved.
+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/i386/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