This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/44987] New: *mmintrin.h files incompatible with partial __attribute__((target("sse...")))
- From: "andi-gcc at firstfloor dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jul 2010 12:08:50 -0000
- Subject: [Bug target/44987] New: *mmintrin.h files incompatible with partial __attribute__((target("sse...")))
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The *mmintr.h files have checks like
#ifndef __SSE4_2__
# error "SSE4.2 instruction set not enabled"
#else
Problem with this is that it assumes that the whole file is compiled with
-msse4.2 or similar option.
But with __attribute__((target(...))) it's possible and appropiate to
let only part of the code use e.g. -msse4.2 and compile the rest
of the file with different options.
The problem is just that *mmintrin.h cannot be used then because
__SSE4_2__ or similar is not set by the target attribute.
One workaround I found was to specify all the defines manually before
including the intrin.h header. But that's rather ugly because it needs
7 different defines or so.
I think it would be better to drop these #ifdefs from the headers
and check the code generation settings for the current function in
the intrinsics instead.
--
Summary: *mmintrin.h files incompatible with partial
__attribute__((target("sse...")))
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: andi-gcc at firstfloor dot org
GCC host triplet: x86_64-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44987