This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Using SSE2 with the old i386 ABI
- From: Florian Weimer <fweimer at redhat dot com>
- To: Jeff Law <law at redhat dot com>, "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Mon, 31 Jul 2017 17:40:52 +0200
- Subject: Re: Using SSE2 with the old i386 ABI
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=fweimer at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 828D016BB00
- References: <5dd1d05c-1ca2-4a25-c29a-f4f645b7814a@redhat.com> <55199c7f-ef02-b943-bd53-f6a0ed4ca7e2@redhat.com>
On 07/31/2017 05:15 PM, Jeff Law wrote:
> It's supposed to. My concern would be that most of the time a
> mis-aligned stack just works -- it's only when we see those key SSE2
> instructions that it'll fault. So bugs in this support could stay
> latent for a long time.
Exactly. I think GCC 6 was the first release were we saw GCC exploiting
struct alignment for SSE2 to heap objects (because the *other* tcmalloc,
in tchsh, did not follow ABI), and GCC 7 is the first release where we
saw SSE2 stack stores in the rather non-vectorizable malloc code in glibc.
I'm pretty sure all hell would break lose if we shipped the i686 compat
userland with SSE2 optimization due to these issues, and I'm concerned
that all things considered, turning on SSE2 optimizations is probably
not worth the effort.
Thanks,
Florian