public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug web/25519]  New: Online Documentation: error for addsubps and missing SSE2 instructions
@ 2005-12-21 16:54 othojunk at gmail dot com
  2005-12-21 16:59 ` [Bug target/25519] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: othojunk at gmail dot com @ 2005-12-21 16:54 UTC (permalink / raw)
  To: gcc-bugs

In the "GCC online documentation" in the page entitled "5.45.5 X86 Built-in
Functions" the lines documenting the addsubps and addsubpd instructions are
listed as:

    v2df __builtin_ia32_addsubpd (v2df, v2df)
    v2df __builtin_ia32_addsubps (v2df, v2df)

The first line is correct as can be deduced by the hungarian notation of double
as 'd' as the last letter. However the second line is a float operator yet the
prototype given implies it to be a float operator. This is not the case as
putting a v2df into the function results in an error. For instance take the
following code:


#include <stdio.h>
typedef double v2df __attribute__ ((vector_size (16)));

int main()  {
    v2df a, b, c;
    c = __builtin_ia32_addsubps (a, b);
    return 1;
}

Attempting to compile this will result in the following error:

error: incompatible types in assignment

A simple change to v4sf will allow the code to compile, and I have verified
that it works according to spec. Also all online documentation for the assembly
instruction associated with this call, addsubps, document it as a 4-vector
single precision float operator.

As a side comment I noticed that none of the sse2 instructions were listed on
this page, yet also exist. For instance the instructions 

__builtin_ia32_addpd
__builtin_ia32_subpd
__builtin_ia32_mulpd
__builtin_ia32_divpd

do not exist on this page yet should.

I appreciate the help that this online documentation has provided. I dislike
using asm on code that needs to be created and maintained in my enviornment,
where little or no training on assembly is done or desired. We perform much
work  on datasets of complex numbers and this documentation has allowed a
simple yet fast and efficient way to perform complex multiplications and other
operations. Here is for instance a macro for a complex multiplication:

// using SSE3 instructions
#define v4sf_complex_mult( a, b)        __builtin_ia32_addsubps (       \
        __builtin_ia32_movsldup (a) * (b),      \
        __builtin_ia32_movshdup (a) * __builtin_ia32_shufps (b, b, 0xb1)  )


-- 
           Summary: Online Documentation: error for addsubps and missing
                    SSE2 instructions
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: web
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: othojunk at gmail dot com


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


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

* [Bug target/25519] Online Documentation: error for addsubps and missing SSE2 instructions
  2005-12-21 16:54 [Bug web/25519] New: Online Documentation: error for addsubps and missing SSE2 instructions othojunk at gmail dot com
@ 2005-12-21 16:59 ` pinskia at gcc dot gnu dot org
  2005-12-25  1:05 ` [Bug target/25519] Intel (SSE/MMX) intrinsics should only be mentioned instead of the builtins pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-21 16:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-12-21 16:59 -------
You should be using the Intel intrinsics by using {x,}mmintrin.h/mm3dnow.h.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|web                         |target
           Keywords|                            |documentation, ssemmx


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


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

* [Bug target/25519] Intel (SSE/MMX) intrinsics should only be mentioned instead of the builtins
  2005-12-21 16:54 [Bug web/25519] New: Online Documentation: error for addsubps and missing SSE2 instructions othojunk at gmail dot com
  2005-12-21 16:59 ` [Bug target/25519] " pinskia at gcc dot gnu dot org
@ 2005-12-25  1:05 ` pinskia at gcc dot gnu dot org
  2006-04-28 17:39 ` [Bug target/25519] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-25  1:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2005-12-25 01:05 -------
The documention should just reference the Intel intrinsics.

Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-12-25 01:05:50
               date|                            |
            Summary|Online Documentation: error |Intel (SSE/MMX) intrinsics
                   |for addsubps and missing    |should only be mentioned
                   |SSE2 instructions           |instead of the builtins


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


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

* [Bug target/25519] [4.0/4.1/4.2 Regression] Intel (SSE/MMX) intrinsics should only be mentioned instead of the builtins
  2005-12-21 16:54 [Bug web/25519] New: Online Documentation: error for addsubps and missing SSE2 instructions othojunk at gmail dot com
  2005-12-21 16:59 ` [Bug target/25519] " pinskia at gcc dot gnu dot org
  2005-12-25  1:05 ` [Bug target/25519] Intel (SSE/MMX) intrinsics should only be mentioned instead of the builtins pinskia at gcc dot gnu dot org
@ 2006-04-28 17:39 ` pinskia at gcc dot gnu dot org
  2006-04-28 17:41 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-28 17:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-04-28 17:39 -------
This is a documentation regression as now, the builtins are inconstaint with
the source.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Severity|trivial                     |normal
            Summary|Intel (SSE/MMX) intrinsics  |[4.0/4.1/4.2 Regression]
                   |should only be mentioned    |Intel (SSE/MMX) intrinsics
                   |instead of the builtins     |should only be mentioned
                   |                            |instead of the builtins
   Target Milestone|---                         |4.0.4


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


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

* [Bug target/25519] [4.0/4.1/4.2 Regression] Intel (SSE/MMX) intrinsics should only be mentioned instead of the builtins
  2005-12-21 16:54 [Bug web/25519] New: Online Documentation: error for addsubps and missing SSE2 instructions othojunk at gmail dot com
                   ` (2 preceding siblings ...)
  2006-04-28 17:39 ` [Bug target/25519] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-04-28 17:41 ` pinskia at gcc dot gnu dot org
  2006-06-04 19:08 ` mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-28 17:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-04-28 17:41 -------
*** Bug 23218 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Pferdebert at west dot de


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


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

* [Bug target/25519] [4.0/4.1/4.2 Regression] Intel (SSE/MMX) intrinsics should only be mentioned instead of the builtins
  2005-12-21 16:54 [Bug web/25519] New: Online Documentation: error for addsubps and missing SSE2 instructions othojunk at gmail dot com
                   ` (3 preceding siblings ...)
  2006-04-28 17:41 ` pinskia at gcc dot gnu dot org
@ 2006-06-04 19:08 ` mmitchel at gcc dot gnu dot org
  2006-10-10 13:55 ` patchapp at dberlin dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-04 19:08 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug target/25519] [4.0/4.1/4.2 Regression] Intel (SSE/MMX) intrinsics should only be mentioned instead of the builtins
  2005-12-21 16:54 [Bug web/25519] New: Online Documentation: error for addsubps and missing SSE2 instructions othojunk at gmail dot com
                   ` (4 preceding siblings ...)
  2006-06-04 19:08 ` mmitchel at gcc dot gnu dot org
@ 2006-10-10 13:55 ` patchapp at dberlin dot org
  2006-10-16  8:36 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: patchapp at dberlin dot org @ 2006-10-10 13:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from patchapp at dberlin dot org  2006-10-10 13:55 -------
Subject: Bug number PR25519

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-10/msg00542.html


-- 


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


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

* [Bug target/25519] [4.0/4.1/4.2 Regression] Intel (SSE/MMX) intrinsics should only be mentioned instead of the builtins
  2005-12-21 16:54 [Bug web/25519] New: Online Documentation: error for addsubps and missing SSE2 instructions othojunk at gmail dot com
                   ` (5 preceding siblings ...)
  2006-10-10 13:55 ` patchapp at dberlin dot org
@ 2006-10-16  8:36 ` rguenth at gcc dot gnu dot org
  2006-10-16  8:39 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-10-16  8:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2006-10-16 08:36 -------
Subject: Bug 25519

Author: rguenth
Date: Mon Oct 16 08:36:03 2006
New Revision: 117774

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117774
Log:
2006-10-16  Richard Guenther  <rguenther@suse.de>

        PR target/25519
        * doc/extend.texi (X86 Built-in Functions): Fix typos in
        SSE builtin documentation.  Document SSE2 builtins.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/doc/extend.texi


-- 


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


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

* [Bug target/25519] [4.0/4.1/4.2 Regression] Intel (SSE/MMX) intrinsics should only be mentioned instead of the builtins
  2005-12-21 16:54 [Bug web/25519] New: Online Documentation: error for addsubps and missing SSE2 instructions othojunk at gmail dot com
                   ` (6 preceding siblings ...)
  2006-10-16  8:36 ` rguenth at gcc dot gnu dot org
@ 2006-10-16  8:39 ` rguenth at gcc dot gnu dot org
  2006-10-16  8:40 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-10-16  8:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2006-10-16 08:39 -------
Subject: Bug 25519

Author: rguenth
Date: Mon Oct 16 08:38:52 2006
New Revision: 117775

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117775
Log:
2006-10-16  Richard Guenther  <rguenther@suse.de>

        PR target/25519
        * doc/extend.texi (X86 Built-in Functions): Fix typos in
        SSE builtin documentation.  Document SSE2 builtins.

Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/doc/extend.texi


-- 


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


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

* [Bug target/25519] [4.0/4.1/4.2 Regression] Intel (SSE/MMX) intrinsics should only be mentioned instead of the builtins
  2005-12-21 16:54 [Bug web/25519] New: Online Documentation: error for addsubps and missing SSE2 instructions othojunk at gmail dot com
                   ` (7 preceding siblings ...)
  2006-10-16  8:39 ` rguenth at gcc dot gnu dot org
@ 2006-10-16  8:40 ` rguenth at gcc dot gnu dot org
  2006-10-16  8:41 ` [Bug target/25519] " rguenth at gcc dot gnu dot org
  2010-05-14  7:36 ` ubizjak at gmail dot com
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-10-16  8:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rguenth at gcc dot gnu dot org  2006-10-16 08:40 -------
Subject: Bug 25519

Author: rguenth
Date: Mon Oct 16 08:40:32 2006
New Revision: 117776

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117776
Log:
2006-10-16  Richard Guenther  <rguenther@suse.de>

        PR target/25519
        * doc/extend.texi (X86 Built-in Functions): Fix typos in
        SSE builtin documentation.  Document SSE2 builtins.

Modified:
    branches/gcc-4_0-branch/gcc/ChangeLog
    branches/gcc-4_0-branch/gcc/doc/extend.texi


-- 


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


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

* [Bug target/25519] Intel (SSE/MMX) intrinsics should only be mentioned instead of the builtins
  2005-12-21 16:54 [Bug web/25519] New: Online Documentation: error for addsubps and missing SSE2 instructions othojunk at gmail dot com
                   ` (8 preceding siblings ...)
  2006-10-16  8:40 ` rguenth at gcc dot gnu dot org
@ 2006-10-16  8:41 ` rguenth at gcc dot gnu dot org
  2010-05-14  7:36 ` ubizjak at gmail dot com
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-10-16  8:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rguenth at gcc dot gnu dot org  2006-10-16 08:41 -------
SSE2 builtins are now documented, so not a regression anymore.  Still a
paragraph mentioning the intrinsics could improve the situation.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
            Summary|[4.0/4.1/4.2 Regression]    |Intel (SSE/MMX) intrinsics
                   |Intel (SSE/MMX) intrinsics  |should only be mentioned
                   |should only be mentioned    |instead of the builtins
                   |instead of the builtins     |
   Target Milestone|4.0.4                       |---


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


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

* [Bug target/25519] Intel (SSE/MMX) intrinsics should only be mentioned instead of the builtins
  2005-12-21 16:54 [Bug web/25519] New: Online Documentation: error for addsubps and missing SSE2 instructions othojunk at gmail dot com
                   ` (9 preceding siblings ...)
  2006-10-16  8:41 ` [Bug target/25519] " rguenth at gcc dot gnu dot org
@ 2010-05-14  7:36 ` ubizjak at gmail dot com
  10 siblings, 0 replies; 12+ messages in thread
From: ubizjak at gmail dot com @ 2010-05-14  7:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from ubizjak at gmail dot com  2010-05-14 07:36 -------
*** Bug 20049 has been marked as a duplicate of this bug. ***


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kirk_korver at hotmail dot
                   |                            |com


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


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

end of thread, other threads:[~2010-05-14  7:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-21 16:54 [Bug web/25519] New: Online Documentation: error for addsubps and missing SSE2 instructions othojunk at gmail dot com
2005-12-21 16:59 ` [Bug target/25519] " pinskia at gcc dot gnu dot org
2005-12-25  1:05 ` [Bug target/25519] Intel (SSE/MMX) intrinsics should only be mentioned instead of the builtins pinskia at gcc dot gnu dot org
2006-04-28 17:39 ` [Bug target/25519] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-04-28 17:41 ` pinskia at gcc dot gnu dot org
2006-06-04 19:08 ` mmitchel at gcc dot gnu dot org
2006-10-10 13:55 ` patchapp at dberlin dot org
2006-10-16  8:36 ` rguenth at gcc dot gnu dot org
2006-10-16  8:39 ` rguenth at gcc dot gnu dot org
2006-10-16  8:40 ` rguenth at gcc dot gnu dot org
2006-10-16  8:41 ` [Bug target/25519] " rguenth at gcc dot gnu dot org
2010-05-14  7:36 ` ubizjak 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).