Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/mit/xorg/lib/pixman dsable SSE2 support on amd64 fo...



details:   https://anonhg.NetBSD.org/src/rev/a56ad272c189
branches:  trunk
changeset: 759190:a56ad272c189
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Dec 01 08:59:12 2010 +0000

description:
dsable SSE2 support on amd64 for now.  GCC generates code that causes
alignment faults.  the code is:

0x00007f7ffd40ccd7 <_pixman_implementation_create_sse2+0>:      push   %rbp
0x00007f7ffd40ccd8 <_pixman_implementation_create_sse2+1>:      mov    %rsp,%rbp
0x00007f7ffd40ccdb <_pixman_implementation_create_sse2+4>:      sub    $0x10,%rsp
...
0x00007f7ffd40cdab <_pixman_implementation_create_sse2+212>:    mov    $0xffffffffffffffff,%rdx
0x00007f7ffd40cdb2 <_pixman_implementation_create_sse2+219>:    mov    %rdx,0xfffffffffffffff0(%rbp)
0x00007f7ffd40cdb6 <_pixman_implementation_create_sse2+223>:    mov    %rdx,0xfffffffffffffff8(%rbp)
0x00007f7ffd40cdba <_pixman_implementation_create_sse2+227>:    movdqa 0xfffffffffffffff0(%rbp),%xmm0

upon entry we have stack aligned to 16 bytes.  the first instruction
subtracts 8, we copy this not-16-byte aligned value into %rbp, and
then decrement the stack by 16 bytes.

then we store a big -1 into 16 bytes on the stack, and then load it
into %xmm0.. except we load it from an unaligned pointer and GP.

diffstat:

 external/mit/xorg/lib/pixman/Makefile |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (23 lines):

diff -r 44caed4665a3 -r a56ad272c189 external/mit/xorg/lib/pixman/Makefile
--- a/external/mit/xorg/lib/pixman/Makefile     Wed Dec 01 07:12:03 2010 +0000
+++ b/external/mit/xorg/lib/pixman/Makefile     Wed Dec 01 08:59:12 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.12 2010/11/21 09:01:35 mrg Exp $
+#      $NetBSD: Makefile,v 1.13 2010/12/01 08:59:12 mrg Exp $
 
 NOLINT=        1       # defined
 
@@ -44,10 +44,10 @@
 MKDEPFLAGS+=           -mmmx -fvisibility=hidden
 .elif ${MACHINE_ARCH} == "x86_64"
 SRCS+= pixman-mmx.c
-SRCS+= pixman-sse2.c
+# XXX sse2 is broken with pixman 0.21.2; GCC generates unaligned accesses
+#SRCS+=        pixman-sse2.c
 COPTS.pixman-mmx.c=    -mmmx -fvisibility=hidden
-COPTS.pixman-sse2.c=   -msse2 -fvisibility=hidden
-MKDEPFLAGS+=           -mmmx -msse2 -fvisibility=hidden
+#COPTS.pixman-sse2.c=  -msse2 -fvisibility=hidden
 .endif
 
 # .if VMX



Home | Main Index | Thread Index | Old Index