summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiarhei Siamashka <siarhei.siamashka@nokia.com>2010-03-22 11:54:51 +0200
committerSiarhei Siamashka <siarhei.siamashka@nokia.com>2010-03-22 12:12:03 +0200
commit68d8d83223b5a35e25d379c2ee9e2e3a1d242323 (patch)
tree7237dbc5a437c990d844369d8bbf48579aa84c99
parent50713d9d0d9241597724551315f05d958ce7a283 (diff)
ARM: Use '.object_arch' directive in NEON assembly file
This can be used to override the architecture recorded in the EABI object attribute section. We set a minimum arch to 'armv4'. Binutils documentation recommends to use this directive with the code performing runtime detection of CPU features. Additionally NEON/VFP EABI attributes are suppressed. And the instruction set to use is explicitly set to '.arm'. Configure test for NEON support is also updated to include a bunch of these new directives (if any of these is unsupported by the assembler, it is better to fail configure test than to fail library build). All these changes are required to fix SIGILL problem on armv4t, reported in http://lists.freedesktop.org/archives/pixman/2010-March/000123.html
-rw-r--r--configure.ac6
-rw-r--r--pixman/pixman-arm-neon-asm.S4
2 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index fc3ee24..4668715 100644
--- a/configure.ac
+++ b/configure.ac
@@ -415,10 +415,14 @@ dnl Check if assembler is gas compatible and supports NEON instructions
have_arm_neon=no
AC_MSG_CHECKING(whether to use ARM NEON assembler)
xserver_save_CFLAGS=$CFLAGS
-CFLAGS="-x assembler-with-cpp"
+CFLAGS="-x assembler-with-cpp $CFLAGS"
AC_COMPILE_IFELSE([[
.text
.fpu neon
+.arch armv7a
+.object_arch armv4
+.eabi_attribute 10, 0
+.arm
.altmacro
#ifndef __ARM_EABI__
#error EABI is required (to be sure that calling conventions are compatible)
diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S
index eb8cc4c..6be8d23 100644
--- a/pixman/pixman-arm-neon-asm.S
+++ b/pixman/pixman-arm-neon-asm.S
@@ -42,6 +42,10 @@
.text
.fpu neon
.arch armv7a
+ .object_arch armv4
+ .eabi_attribute 10, 0 /* suppress Tag_FP_arch */
+ .eabi_attribute 12, 0 /* suppress Tag_Advanced_SIMD_arch */
+ .arm
.altmacro
#include "pixman-arm-neon-asm.h"