<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 18 June 2015 at 19:46, Emil Velikov <span dir="ltr"><<a href="mailto:emil.l.velikov@gmail.com" target="_blank">emil.l.velikov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">On 18 June 2015 at 06:53, Julien Isorce <<a href="mailto:julien.isorce@gmail.com">julien.isorce@gmail.com</a>> wrote:<br>
> Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=90908" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=90908</a><br>
> Signed-off-by: Julien Isorce <<a href="mailto:j.isorce@samsung.com">j.isorce@samsung.com</a>><br>
> ---<br>
> <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> | 2 +-<br>
> src/mesa/x86-64/xform4.S | 53 +++++++++++++++++++++++++-----------------------<br>
> src/mesa/x86/assyntax.h | 2 +-<br>
> 3 files changed, 30 insertions(+), 27 deletions(-)<br>
><br>
> diff --git a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
> index ae6d83d..6d699d5 100644<br>
> --- a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
> +++ b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
> @@ -615,7 +615,7 @@ if test "x$enable_asm" = xyes; then<br>
> ;;<br>
> x86_64|amd64)<br>
> case "$host_os" in<br>
> - linux* | *freebsd* | dragonfly* | *netbsd* | openbsd*)<br>
> + linux* | *freebsd* | dragonfly* | *netbsd* | openbsd* | darwin*)<br>
> asm_arch=x86_64<br>
> ;;<br>
> esac<br>
> diff --git a/src/mesa/x86-64/xform4.S b/src/mesa/x86-64/xform4.S<br>
> index c185f62..17eb7fa 100644<br>
> --- a/src/mesa/x86-64/xform4.S<br>
> +++ b/src/mesa/x86-64/xform4.S<br>
> @@ -24,14 +24,15 @@<br>
><br>
> #ifdef USE_X86_64_ASM<br>
><br>
> +#include "x86/assyntax.h"<br>
> #include "matypes.h"<br>
><br>
> .text<br>
><br>
> .align 16<br>
> -.globl _mesa_x86_64_cpuid<br>
> -.hidden _mesa_x86_64_cpuid<br>
> -_mesa_x86_64_cpuid:<br>
> +GLOBL GLNAME(_mesa_x86_64_cpuid)<br>
> +HIDDEN(_mesa_x86_64_cpuid)<br>
> +GLNAME(_mesa_x86_64_cpuid):<br>
> pushq %rbx<br>
> movl (%rdi), %eax<br>
> movl 8(%rdi), %ecx<br>
> @@ -46,9 +47,9 @@ _mesa_x86_64_cpuid:<br>
> ret<br>
><br>
> .align 16<br>
> -.globl _mesa_x86_64_transform_points4_general<br>
> -.hidden _mesa_x86_64_transform_points4_general<br>
> -_mesa_x86_64_transform_points4_general:<br>
> +GLOBL GLNAME(_mesa_x86_64_transform_points4_general)<br>
> +HIDDEN(_mesa_x86_64_transform_points4_general)<br>
> +GLNAME(_mesa_x86_64_transform_points4_general):<br>
> /*<br>
> * rdi = dest<br>
> * rsi = matrix<br>
> @@ -105,8 +106,10 @@ p4_general_loop:<br>
> p4_general_done:<br>
> .byte 0xf3<br>
> ret<br>
> -<br>
> +<br>
> +#if defined (__ELF__) && defined (__linux__)<br>
> .section .rodata<br>
> +#endif<br>
><br>
> .align 16<br>
> p4_constants:<br>
> @@ -122,13 +125,13 @@ p4_constants:<br>
><br>
> .text<br>
> .align 16<br>
> -.globl _mesa_x86_64_transform_points4_3d<br>
> -.hidden _mesa_x86_64_transform_points4_3d<br>
> +GLOBL GLNAME(_mesa_x86_64_transform_points4_3d)<br>
> +HIDDEN(_mesa_x86_64_transform_points4_3d)<br>
> /*<br>
> * this is slower than _mesa_x86_64_transform_points4_general<br>
> * because it ensures that the last matrix row (or is it column?) is 0,0,0,1<br>
> */<br>
> -_mesa_x86_64_transform_points4_3d:<br>
> +GLNAME(_mesa_x86_64_transform_points4_3d):<br>
><br>
> leaq p4_constants(%rip), %rax<br>
><br>
> @@ -194,9 +197,9 @@ p4_3d_done:<br>
><br>
><br>
> .align 16<br>
> -.globl _mesa_x86_64_transform_points4_identity<br>
> -.hidden _mesa_x86_64_transform_points4_identity<br>
> -_mesa_x86_64_transform_points4_identity:<br>
> +GLOBL GLNAME(_mesa_x86_64_transform_points4_identity)<br>
> +HIDDEN(_mesa_x86_64_transform_points4_identitiy)<br>
> +GLNAME(_mesa_x86_64_transform_points4_identity):<br>
><br>
> movl V4F_COUNT(%rdx), %ecx /* count */<br>
> movzbl V4F_STRIDE(%rdx), %eax /* stride */<br>
> @@ -223,9 +226,9 @@ p4_identity_done:<br>
><br>
><br>
> .align 16<br>
> -.globl _mesa_3dnow_transform_points4_3d_no_rot<br>
> -.hidden _mesa_3dnow_transform_points4_3d_no_rot<br>
> -_mesa_3dnow_transform_points4_3d_no_rot:<br>
> +GLOBL GLNAME(_mesa_3dnow_transform_points4_3d_no_rot)<br>
> +HIDDEN(_mesa_3dnow_transform_points4_3d_no_rot)<br>
> +GLNAME(_mesa_3dnow_transform_points4_3d_no_rot):<br>
><br>
> movl V4F_COUNT(%rdx), %ecx /* count */<br>
> movzbl V4F_STRIDE(%rdx), %eax /* stride */<br>
> @@ -288,9 +291,9 @@ p4_3d_no_rot_done:<br>
><br>
><br>
> .align 16<br>
> -.globl _mesa_3dnow_transform_points4_perspective<br>
> -.hidden _mesa_3dnow_transform_points4_perspective<br>
> -_mesa_3dnow_transform_points4_perspective:<br>
> +GLOBL GLNAME(_mesa_3dnow_transform_points4_perspective)<br>
> +HIDDEN(_mesa_3dnow_transform_points4_perspective)<br>
> +GLNAME(_mesa_3dnow_transform_points4_perspective):<br>
><br>
> movl V4F_COUNT(%rdx), %ecx /* count */<br>
> movzbl V4F_STRIDE(%rdx), %eax /* stride */<br>
> @@ -355,9 +358,9 @@ p4_perspective_done:<br>
> ret<br>
><br>
> .align 16<br>
> -.globl _mesa_3dnow_transform_points4_2d_no_rot<br>
> -.hidden _mesa_3dnow_transform_points4_2d_no_rot<br>
> -_mesa_3dnow_transform_points4_2d_no_rot:<br>
> +GLOBL GLNAME(_mesa_3dnow_transform_points4_2d_no_rot)<br>
> +HIDDEN(_mesa_3dnow_transform_points4_2d_no_rot)<br>
> +GLNAME(_mesa_3dnow_transform_points4_2d_no_rot):<br>
><br>
> movl V4F_COUNT(%rdx), %ecx /* count */<br>
> movzbl V4F_STRIDE(%rdx), %eax /* stride */<br>
> @@ -411,9 +414,9 @@ p4_2d_no_rot_done:<br>
><br>
><br>
> .align 16<br>
> -.globl _mesa_3dnow_transform_points4_2d<br>
> -.hidden _mesa_3dnow_transform_points4_2d<br>
> -_mesa_3dnow_transform_points4_2d:<br>
> +GLOBL GLNAME(_mesa_3dnow_transform_points4_2d)<br>
> +HIDDEN(_mesa_3dnow_transform_points4_2d)<br>
> +GLNAME(_mesa_3dnow_transform_points4_2d):<br>
><br>
> movl V4F_COUNT(%rdx), %ecx /* count */<br>
> movzbl V4F_STRIDE(%rdx), %eax /* stride */<br>
> diff --git a/src/mesa/x86/assyntax.h b/src/mesa/x86/assyntax.h<br>
> index 67867bd..8ba7e50 100644<br>
> --- a/src/mesa/x86/assyntax.h<br>
> +++ b/src/mesa/x86/assyntax.h<br>
> @@ -255,7 +255,7 @@<br>
> #endif /* ACK_ASSEMBLER */<br>
><br>
><br>
> -#if defined(__QNX__) || defined(Lynx) || (defined(SYSV) || defined(SVR4)) && !defined(ACK_ASSEMBLER) || defined(__ELF__) || defined(__GNU__) || defined(__GNUC__) && !defined(__MINGW32__)<br>
> +#if defined(__QNX__) || defined(Lynx) || (defined(SYSV) || defined(SVR4)) && !defined(ACK_ASSEMBLER) || defined(__ELF__) || defined(__GNU__) || defined(__GNUC__) && !defined(__MINGW32__) && !defined(__APPLE__)<br>
> #define GLNAME(a) a<br>
> #else<br>
> #define GLNAME(a) CONCAT(_,a)<br>
<br>
</div></div>Considering that this is a fragile area in mesa, can you confirm what<br>
kind of testing you've done ? Would be nice to avoid breaking things<br>
in various subtle ways.<br></blockquote><div><br></div><div>Very minimal tests: only glxgears and es2gears_x11, on osx. </div><div>Also "make check" succeeds until it reaches glx-test which fails to build (link error). I need to submit a bug.</div>
<div><br></div><div>For the record here are the configure options:</div><div><p class=""><span class="">--enable-debug --enable-asm --disable-vdpau --disable-va -</span>-disable-omx --enable-dri --with-gallium-drivers=swrast --enable-gles2 --enable-gles1 --enable-glx --enable-opengl --enable-gallium-osmesa --with-egl-platforms=x11 --enable-gallium-llvm --disable-llvm-shared-libs</p></div><div>Cheers</div><div>Julien</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Note to self: Upon a closer look, I'm not sure of many of the<br>
assemblers mentioned in assyntax.h are available/used nowadays. Maybe<br>
we can have a crazy^W brave soul that does some cleanup in here :-)<br>
<span class=""><font color="#888888"><br>
-Emil<br>
</font></span></blockquote></div><br></div></div>