public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/44987]  New: *mmintrin.h files incompatible with partial __attribute__((target("sse...")))
@ 2010-07-19 12:09 andi-gcc at firstfloor dot org
  2010-07-19 13:03 ` [Bug target/44987] " rguenth at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: andi-gcc at firstfloor dot org @ 2010-07-19 12:09 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-02  8:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-44987-4@http.gcc.gnu.org/bugzilla/>
2021-09-02  8:04 ` [Bug target/44987] *mmintrin.h files incompatible with partial __attribute__((target("sse..."))) pinskia at gcc dot gnu.org
2010-07-19 12:09 [Bug target/44987] New: " andi-gcc at firstfloor dot org
2010-07-19 13:03 ` [Bug target/44987] " rguenth at gcc dot gnu dot org
2010-07-19 13:27 ` hjl dot tools at gmail dot com
2010-07-19 15:47 ` andi-gcc at firstfloor dot org
2010-07-19 18:02 ` hjl dot tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).