<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [llvmpipe] SEGV in sse2_has_daz on ancient Pentium4-M"
href="https://bugs.freedesktop.org/show_bug.cgi?id=87658#c17">Comment # 17</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [llvmpipe] SEGV in sse2_has_daz on ancient Pentium4-M"
href="https://bugs.freedesktop.org/show_bug.cgi?id=87658">bug 87658</a>
from <span class="vcard"><a class="email" href="mailto:ubizjak@gmail.com" title="ubizjak@gmail.com">ubizjak@gmail.com</a>
</span></b>
<pre>(In reply to Patrick Baggett from <a href="show_bug.cgi?id=87658#c16">comment #16</a>)
<span class="quote">> That is strange...I would have expected an "illegal instruction" (SIGILL) if
> the CPU simply did not support this, but this is SIGSEGV. Is the 'fxsave'
> struct really aligned properly? It looks like should be...but it is still
> giving SIGSEGV. Can you print the 'fxsave' address when it crashes?</span >
As said above, with 32bit gcc, you need to decorate the function with
'force_align_arg_pointer'
On the Intel x86, the 'force_align_arg_pointer' attribute may be
applied to individual function definitions, generating an alternate
prologue and epilogue that realigns the run-time stack if
necessary. This supports mixing legacy codes that run with a
4-byte aligned stack with modern codes that keep a 16-byte stack
for SSE compatibility.
"New" x86_32 ABI mandates 16-byte stack alignment, and the above attribute
forces realignment of the incoming stack pointer. Maybe there is a hand-crafted
assembly code in the MESA source, libc or somewhere else (that conforms to
"old" x86_32 ABI with 4-byte stack alignment) that misaligns the SP.
Alternatively, you can use posix_memalign, aligned_alloc or similar function to
allocate aligned memory.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>