This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/59697] Function attribute __target_(("no-avx)) work on Windows/mingw but fails on Linux.


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59697

--- Comment #1 from Ãystein SchÃnning-Johansen <oystein at gnubg dot org> ---
Follow up:

I try the same code on a RedHat 6.5 64bit workstation with GCC4.4.

st-lx794988(ojohans) -/ojohans 37> gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) 

On this system the sse function is also translated to avx instructions. :-(

00000000004004f0 <calculate_sse>:
  4004f0:    c1 fe 02                 sar    $0x2,%esi
  4004f3:    85 f6                    test   %esi,%esi
  4004f5:    74 2e                    je     400525 <calculate_sse+0x35>
  4004f7:    83 ee 01                 sub    $0x1,%esi
  4004fa:    c5 f8 c6 c0 00           vshufps $0x0,%xmm0,%xmm0,%xmm0
  4004ff:    48 c1 e6 04              shl    $0x4,%rsi
  400503:    48 8d 44 37 10           lea    0x10(%rdi,%rsi,1),%rax
  400508:    0f 1f 84 00 00 00 00     nopl   0x0(%rax,%rax,1)
  40050f:    00 
  400510:    c5 f8 28 0f              vmovaps (%rdi),%xmm1
  400514:    c5 f0 59 c8              vmulps %xmm0,%xmm1,%xmm1
  400518:    c5 f8 29 0f              vmovaps %xmm1,(%rdi)
  40051c:    48 83 c7 10              add    $0x10,%rdi
  400520:    48 39 c7                 cmp    %rax,%rdi
  400523:    75 eb                    jne    400510 <calculate_sse+0x20>
  400525:    f3 c3                    repz retq 
  400527:    66 0f 1f 84 00 00 00     nopw   0x0(%rax,%rax,1)


-Ãystein

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]