This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 1/3] sparc: build with -mvis on sparc32/sparcv9 and sparc64


When building for sparc32/sparcv9 or sparc64, we assume that VIS
instructions are available and use them in the sparc specific assembly
code. However we do not tell GCC to use such instructions, resulting in
slightly suboptimal code.

Fix that by passing -Wa,-Av9a -mvis to GCC.

Changelog:
	* sysdeps/sparc/sparc32/sparcv9/Makefile (sysdep-CFLAGS): Add -mvis.
	* sysdeps/sparc/sparc64/Makefile (sysdep-CFLAGS): New. Define to
	-Wa,-Av9a -mvis.
---
 ChangeLog                              | 6 ++++++
 sysdeps/sparc/sparc32/sparcv9/Makefile | 2 +-
 sysdeps/sparc/sparc64/Makefile         | 2 ++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index ac692dc..c3fe9fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-08-04  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/sparc/sparc32/sparcv9/Makefile (sysdep-CFLAGS): Add -mvis.
+	* sysdeps/sparc/sparc64/Makefile (sysdep-CFLAGS): New. Define to
+	-Wa,-Av9a -mvis.
+
 2016-08-03  Joseph Myers  <joseph@codesourcery.com>
 
 	* bits/libc-header-start.h (__GLIBC_USE_IEC_60559_FUNCS_EXT): New
diff --git a/sysdeps/sparc/sparc32/sparcv9/Makefile b/sysdeps/sparc/sparc32/sparcv9/Makefile
index fefc742..08c5a96 100644
--- a/sysdeps/sparc/sparc32/sparcv9/Makefile
+++ b/sysdeps/sparc/sparc32/sparcv9/Makefile
@@ -1,4 +1,4 @@
-sysdep-CFLAGS += -mcpu=ultrasparc -Wa,-Av9a
+sysdep-CFLAGS += -mcpu=ultrasparc -Wa,-Av9a -mvis
 
 ifeq ($(have-as-vis3),yes)
 ASFLAGS-.o += -Wa,-Av9d
diff --git a/sysdeps/sparc/sparc64/Makefile b/sysdeps/sparc/sparc64/Makefile
index 3a12510..fbabf69 100644
--- a/sysdeps/sparc/sparc64/Makefile
+++ b/sysdeps/sparc/sparc64/Makefile
@@ -1,3 +1,5 @@
+sysdep-CFLAGS += -Wa,-Av9a -mvis
+
 ifeq ($(subdir),string)
 sysdep_routines += align-cpy
 endif
-- 
2.8.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]